/* ============================================================
   HEADER
   ============================================================ */

.topbar {

    position: relative;

    width: 100%;

    height: 90px;

    padding: 0 60px;

    display: grid;

    /*
       Equal left + right columns guarantee that
       Grace Tsarev stays EXACTLY in the middle.
    */

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    background: var(--header-bg);
    color: var(--header-text);
}


/* ============================================================
   LEFT NAV
   ============================================================ */

.nav-left {

    display: flex;

    justify-content: flex-start;

    align-items: center;

    gap: 45px;
}


/* ============================================================
   RIGHT NAV
   ============================================================ */

.nav-right {

    display: flex;

    justify-content: flex-end;

    align-items: center;

    gap: 45px;
}


/* ============================================================
   NAV LINKS
   ============================================================ */

.nav-left a,
.nav-right a {
font-weight: normal;
    font-size: 1.75em;

    white-space: nowrap;
}


/* ============================================================
   BIG CENTER NAME
   ============================================================ */

.site-name {

    margin: 0 60px;

    font-size: 36px;

    line-height: 1;

    white-space: nowrap;

    text-align: center;
}


/* ============================================================
   SCALLOPED BOTTOM

   Instead of trying to draw this with a complicated gradient,
   we're making a repeating row of aubergine circles.

   The top half hides behind the header.
   The bottom half hangs down.

   Much harder for browsers to screw up. :)
   ============================================================ */

.scallop-edge {
    position: absolute;

    left: 0;
    bottom: -18px;

    width: 100%;
    height: 20px;

    background:
        radial-gradient(
            circle at 20px 0,
            var(--header-bg) 20px,
            transparent 21px
        );

    background-size: 40px 20px;
    background-repeat: repeat-x;

    z-index: 2;

    pointer-events: none;
}

/* ============================================================
   SIMPLE HOVER
   ============================================================ */

.nav-left a,
.nav-right a,
.site-name {
font-family: "Shortcake Strawberry";
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.nav-left a:hover,
.nav-right a:hover {

    opacity: 0.65;
}

.site-name:hover {

    transform: scale(1.025);
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 750px) {

    .topbar {
        height: auto;
        min-height: 125px;

        padding: 18px 20px 27px;

        grid-template-columns: 1fr 1fr;

        grid-template-areas:
            "name name"
            "left right";

        row-gap: 18px;
        column-gap: 12px;
    }

    /* Center name */

    .site-name {
        grid-area: name;

        margin: 0;

        font-size: 30px;
        text-align: center;
    }

    /* Left side */

    .nav-left {
        grid-area: left;

        justify-content: flex-start;

        gap: 18px;
    }

    /* Right side */

    .nav-right {
        grid-area: right;

        justify-content: flex-end;

        gap: 18px;
    }

    /* Mobile nav links */

    .nav-left a,
    .nav-right a {
        font-size: 17px;
        line-height: 1;
    }
}