/* COLORS */
:root {
    --grey: #AEB5B8;
    --black: #040507;
    --border: #525252;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    background-color: var(--black);
    color: var(--grey);
    font-family: "JetBrains Mono", "Courier New", monospace;
    font-size: 1rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

::selection {
    background: var(--grey);
    color: var(--black);
}

/* Controles all the buttons — same clip-path hover as before */
.btn {
    cursor: pointer;
    position: relative;
    color: var(--clr);
    border: none;
    padding: 0.35rem 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    width: auto;
    background: transparent;
    overflow: hidden;
    transition: 0.75s;
    text-decoration: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;

    /*---BORDER-BTN---*/
    &.border-btn {
        border: 0.063rem solid var(--border);
    }

    &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--clr);
        clip-path: circle(0% at 50% 50%);
        -webkit-clip-path: circle(0% at 50% 50%);
        transition: 0.75s;
        z-index: -1;
    }

    &:hover::after {
        clip-path: circle(100% at 50% 50%);
        -webkit-clip-path: circle(100% at 50% 50%);
    }

    &:hover {
        color: var(--black);
        border-color: transparent;
    }

    &.glow-btn:hover {
        box-shadow: 0 0 0.625rem var(--clr), 0 0 3.125rem var(--clr);
        border-color: var(--grey);
    }
}

/* boot screen */
.boot {
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 10;
    display: flex;
    align-items: flex-start;
    padding: 2rem;
    transition: opacity 0.5s;
    pointer-events: none;

    #boot-log {
        margin: 0;
        font-family: inherit;
        color: var(--grey);
        white-space: pre-wrap;
    }
}

.boot.done {
    opacity: 0;
}

/* header */
header {
    border-bottom: 0.063rem solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(4, 5, 7, 0.85);
    backdrop-filter: blur(0.375rem);
    -webkit-backdrop-filter: blur(0.375rem);
    z-index: 5;
    transition: transform 0.3s ease;
}

/* hidden while scrolling down, slides back when scrolling up */
header.nav-hidden {
    transform: translateY(-100%);
}

nav {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    ul {
        list-style: none;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 0.25rem;
        margin: 0;
        padding: 0;
    }
}

#nav-toggle {
    display: none;
}

#logo {
    color: var(--grey);
    font-weight: 700;
    text-decoration: none;
    transition: 0.5s ease;
    white-space: nowrap;

    &:hover {
        color: #e3e3e3;
    }
}

/* main layout */
main {
    flex-grow: 1;
    width: 100%;
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

/* prompts */
.prompt {
    color: var(--border);
    margin: 0 0 1.5rem 0;

    &::before {
        content: "";
    }
}

.prompt-inline {
    color: var(--border);
}

/* hero */
.hero {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;

    .hero-info {
        display: flex;
        flex-direction: column;
        gap: 1rem;

        h1 {
            font-size: 2.5rem;
            font-weight: 700;
            margin: 0;
            color: var(--grey);
            min-height: 3.5rem;
        }

        .hero-sub {
            margin: 0;
            font-size: 1.1rem;
            max-width: 30rem;
        }

        .hero-links {
            display: flex;
            gap: 0.75rem;
            margin-top: 1rem;

            .btn {
                border: 0.063rem solid var(--border);
            }
        }
    }
}

.cursor-block {
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ASCII art */
.ascii-box {
    display: flex;
    align-items: center;
    justify-content: center;

    #ascii-art {
        margin: 0;
        font-family: inherit;
        font-size: 0.7rem;
        line-height: 0.7rem;
        letter-spacing: 0.04rem;
        color: var(--grey);
        text-shadow: 0 0 0.5rem rgba(174, 181, 184, 0.3);
        user-select: none;
        white-space: pre;
    }
}

/* sections */
.content-section {
    scroll-margin-top: 5rem;
}

/* projecten */
.project-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.project-entry {
    padding: 1.5rem 0;
    border-top: 0.063rem solid var(--border);
    transition: 0.75s;

    &:last-child {
        border-bottom: 0.063rem solid var(--border);
    }

    &:hover {
        padding-left: 0.75rem;

        .project-name {
            color: #e3e3e3;
        }
    }

    .project-line {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .project-name {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--grey);
        transition: 0.75s;
    }

    .project-stack {
        color: var(--border);
        font-size: 0.9rem;
    }

    p {
        margin: 0.5rem 0 0.75rem 0;
        max-width: 40rem;
    }

    .project-links {
        display: flex;
        gap: 0.5rem;

        .btn {
            padding: 0.2rem 0.5rem;
            font-size: 0.9rem;
        }
    }
}

/* over */
.about {
    max-width: 40rem;

    p {
        margin: 0 0 1.25rem 0;
    }

    .skills-line {
        margin: 0;
    }
}

/* contact */
.contact {
    p {
        margin: 0 0 1.5rem 0;
        max-width: 40rem;
    }

    .contact-btn {
        font-size: 1.1rem;
        padding: 0.6rem 2rem;
    }
}

#contact {
    padding-bottom: 5rem;
}

/* footer */
footer {
    /* full-bleed line; length = footer width (100%) */
    border-top: 0.063rem solid var(--border);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;

    max-width: 60rem;
    width: 100%;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    box-sizing: border-box;
}

footer {
    #footer-links {
        display: flex;
        gap: 0.25rem;

        .btn {
            padding: 0.2rem 0.5rem;
            font-size: 0.9rem;
            gap: 0.4rem;
        }

        /* phosphor icons: hidden on desktop, shown on mobile */
        .icon {
            display: none;
            width: 1.25rem;
            height: 1.25rem;
        }
    }
}

/* Tablet / mobile */
@media (max-width: 64rem) {
    .hideOnMobile {
        display: none;
    }

    .btn {
        transition: 0.35s;
    }

    .hero {
        justify-content: flex-start;
        min-height: calc(100svh - 60px);

        .hero-info h1 {
            font-size: clamp(1.6rem, 6vw, 2.5rem);
            min-height: 2.5rem;
        }
    }
}

@media (max-width: 37.5rem) {
    /* nav: logo + [ menu ] toggle on one row, links fold out below */
    nav {
        flex-wrap: wrap;

        #nav-toggle {
            display: inline-flex;
            padding: 0.5rem 0.75rem;
        }

        ul {
            display: none;
            flex-basis: 100%;
            flex-direction: column;
            align-items: stretch;
            gap: 0;
            margin-top: 0.6rem;
            padding-top: 0.35rem;
            border-top: 0.063rem solid var(--border);

            .btn {
                width: 100%;
                justify-content: flex-start;
                box-sizing: border-box;
                padding: 0.75rem 0.5rem;
                font-size: 1rem;
            }

            .border-btn {
                border: none;
            }
        }
    }

    nav.open ul {
        display: flex;
    }

    .hero {
        min-height: calc(100svh - 60px);
    }

    /* footer: copyright left, icons right, one row */
    .footer-inner {
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1.5rem;
    }

    footer {
        #footer-links {
            gap: 0.5rem;

            .btn {
                padding: 0.6rem;
            }

            .btn-label {
                display: none;
            }

            .icon {
                display: block;
            }
        }
    }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn,
    .btn::after,
    .project-entry,
    .project-name,
    header {
        transition: none;
    }

    .cursor-block {
        animation: none;
    }
}
