.container .links {
    flex: 0 0 50%;
    min-height: 0;
    position: relative;

    display: flex;
    flex-direction: column;

    font-family: 'ABC Areal', Arial, Helvetica, sans-serif;
}

.current-semester {
    position: absolute;
    top: 3px;
    right: 4px;
    z-index: 1;

    font-size: 1.1vw;
    line-height: 1.1;
    text-align: right;
    white-space: nowrap;
    color: #fff;
}

.courses {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 3vw;

    display: flex;
    flex-direction: column;

    background: blue;
    color: #000;
}

.cloud-shapes {
    position: absolute;
}

.courses {
    .course {
        flex: 1 1 0;
        min-height: 0;

        align-self: center;
        display: grid;

        font-size: 2.2vw;
        line-height: 0.95;
        text-align: center;
    }

    .course a {
        padding: 0 1.5em;
        text-decoration: none;
        pointer-events: none;

        display: grid;
        place-items: center;

        position: relative;
        isolation: isolate;

        transition: color .2s;

        &:hover {
            color: blue;
        }

        &::before {
            content: "";
            position: absolute;
            inset: 0 -22%;
            z-index: -1;
            pointer-events: auto;

            background: white;
            transition: transform .5s cubic-bezier(.2, 1.4, .4, 1);
        }

        &:hover::before {
            transform: scale(1.04);
        }

        > * {
            position: relative;
            top: 10%;
        }
    }

    .course:nth-child(3n + 1) a::before {
        clip-path: url(#semester-v2-cloud-1);
    }

    .course:nth-child(3n + 2) a::before {
        clip-path: url(#semester-v2-cloud-2);
    }

    .course:nth-child(3n + 3) a {
        &::before {
            clip-path: url(#semester-v2-cloud-3);
            transform: scaleX(-1);
        }

        &:hover::before {
            transform: scale(-1.04, 1.04);
        }
    }
}

.past {
    flex: 0 0 auto;

    background: lime;
    color: black;

    font-size: 1.1vw;
    line-height: 1.1;

    .past-table {
        display: table;
        width: 100%;
    }

    .course {
        display: table-row;
        text-decoration: none;

        &:hover {
            background: black;
            color: lime;
        }
    }

    .title,
    .semester {
        display: table-cell;
        padding: 2px;
    }

    .semester {
        text-align: right;
        white-space: nowrap;
    }

    .course + .course .title,
    .course + .course .semester {
        border-top: 1px solid black;
    }
}

.courses a,
.past a {
    color: inherit;
}

@media (orientation: portrait) {
    .container {
        .meta-nav {
            display: none;
        }

        .links {
            flex-basis: 100%;
        }

        .site-title {
            left: 4px;

            &::before,
            &::after {
                translate: none;
            }
        }
    }

    .container .site-title,
    .current-semester,
    .courses .course,
    .past {
        font-size: 16px;
    }
}
