/* -----------------------------------------------------------------------
   Media-responsive project brief template, copyright © 2022-2024 Darren Wilson
   ----------------------------------------------------------------------- */

/* SCREEN CSS */

:root {
    box-sizing: border-box;
    font-size: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Myriad Web Pro", sans-serif;
    font-size: clamp(0.875rem, 0.6964rem + 0.7143vw, 1rem);
    line-height: 1.6;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 14rem 35rem 1fr;
    grid-template-rows: auto auto auto;
    grid-gap: 1rem;
    transition: all 0.5s;
}

/* MAJOR GRID SECTIONS */

header {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    margin: 0;
}

main {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    margin: 0;
}

aside {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    margin: 0;
}

footer {
    grid-column: 3 / 4;
    grid-row: 3 / 3;
    margin: 0;
}

/* TEXT STYLING */

h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    margin: 0;
}

h2 {
    font-size: 1.5rem;
    line-height: 1em;
}

header h2 {
    padding-top: 0.5em;
}

h3 {
    font-size: 1rem;
    padding: 0.5em inherit;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--brandSecondary);
}

p,
ol,
ul,
li {
    width: 100%;
    -webkit-hyphens: auto;
    hyphens: auto;
    padding: 0;
    margin: 0;
}

table {
    width: 100%;
    -webkit-hyphens: auto;
    hyphens: auto;
    margin: 0;
}

ol,
ul {
    width: auto !important;
}

ol {
    list-style: decimal;
}

ul {
    list-style: disc;
}

p {
    padding: 0 0 1em 0;
}

p + h3,
ul + h3 {
    padding-top: 1em;
    border-top: 1px var(--brandSecondary) dotted;
}

main h4 {
    display: block;
    color: var(--brandPrimary);
    font-weight: 700;
}

main h5 {
    display: inline-block;
    color: var(--brandPrimary);
    font-weight: 700;
    font-style: italic;
}

main h5::after {
    content: ". ";
}

main h5 + p {
    display: inline;

    &::after {
        content: "_";
        display: block;
        visibility: hidden;
    }
}

.hidden {
    display: none;
}

/* LINK STYLING */

a:link {
    color: var(--brandPrimary);
    text-decoration: none;
    border-bottom: 1px var(--brandPrimary) dotted;
}

a:visited {
    color: var(--brandPrimary);
}

a:hover {
    background-color: var(--bgColor);
}

a:active {
    color: var(--brandPrimary);
}

/* SIDEBAR */

aside #tocIcon {
    display: block;
    position: absolute;
    bottom: -2.5em;
    padding-top: 0.75em;
    border-top: 1px var(--brandSecondary) solid;
    margin-top: 1.5em;
}

aside #tocIcon a {
    color: var(--brandSecondary);
    text-decoration: none;
    border-bottom: 0;
    margin-right: 0.25em;
}

aside #tocIcon a:hover {
    color: var(--brandPrimary);
    background: none;
}

aside a.extLink::after {
    content: url(../img/icons/open_in_new_12px.svg);
    width: 14px;
    height: 14px;
    padding: 0 0 0 6px;
    margin: 0 2px 0 0;
}

/* HEADER BLOCK STYLING*/

header #courseInfo img.col {
    width: 25vw;
    max-width: 15rem;
    min-width: 240px;
    display: block;
    margin: 1em -0.8rem 0 1rem;
}

header #courseInfo img.bk {
    display: none;
    margin-top: 1em;
}

header #courseInfo {
    display: grid;
    top: 0;
    z-index: 200;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    grid-template-columns: max-content 1fr;
    grid-template-rows: max-content auto;
    grid-column-gap: 0.5em;
    grid-row-gap: 0.5em;
    align-items: end;
    width: 100%;
    height: max-content;
    margin: 0;
    padding: 0;
}

header #courseInfo img {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    height: 6em;
    align-self: end;
    justify-self: end;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: baseline;
}

header #courseInfo h3 {
    display: block;
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    font-size: 0.875em;
    height: max-content;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 1em !important;
    line-height: 1em;
}

header #courseID {
    /* white-space: nowrap; */
}

header #courseCode {
    display: inline-block;
}

header #courseCode::after {
    content: " ";
}

header #courseName {
    display: inline-block;
}

header #courseInfo h4 {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    font-size: 0.75em;
    line-height: 1em;
    color: var(--brandPrimary);
    font-weight: 400;
    letter-spacing: 0.01em;
    margin: 0 !important;
    padding: 0 !important;
    align-self: end;
    width: 100%;
    margin-bottom: -0.15em !important;
}

h4#programID {
    display: none;
}

header #programCode {
    display: inline-block;
    font-weight: 700;
}

header #programCode::after {
    content: ": ";
}

header #courseInfo #spacer {
    grid-column: 1 / 3;
    /*    grid-row: 2 / 3;*/
}

header #courseInfo h1 {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    padding-bottom: 0.5em;
    margin-bottom: 0;
    /*    border-bottom: 1px var(--brandSecondary) solid;*/
}

header #programName {
    display: inline-block;
}

#overviewBlock {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr clamp(4rem, 6.618vw + 2.015rem, 6.25rem);
    grid-gap: 1.5rem;
}

#overviewBlock blockquote {
    grid-column: 1 / 2;
    width: auto;
    padding: 2rem 0 2rem 2rem;
    text-indent: -0.6rem;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.2em;
    letter-spacing: -0.02em;
}

#overviewBlock p {
    grid-column: 1 / 2;
    width: auto;
    padding: 2rem 0 2rem 0;
}

#overviewBlock blockquote figcaption {
    font-weight: normal;
    margin-top: 0.5rem;
    font-size: 0.75em;
    margin-left: 0.6rem;
    letter-spacing: normal;
}

#qrcode {
    display: inline-block;
    width: clamp(4rem, 6.618vw + 2.015rem, 6.25rem);
    margin: 2rem 0;
    float: right;
}

#qrcode img {
    height: clamp(4rem, 6.618vw + 2.015rem, 6.25rem);
    transition: all 0.5s;
}

header h1#projectName {
    font-size: 2rem;
    line-height: 1em;
    margin: 0.5rem 0 0 0;
    padding: 0;
    letter-spacing: -0.02em;
}

header #lastRevised::before {
    content: "Last revised: ";
}

header #lastRevised {
    font-size: 0.75rem;
    font-weight: normal;
    color: var(--brandSecondary);
    margin: 0;
    padding: 0;
    display: inline-block;
}

header p:last-of-type {
    padding-bottom: 1em;
    margin-bottom: 0;
}

/* TABLE OF CONTENTS STYLING */

aside {
    padding-top: 1rem;
    /*    background-color: rgba(1, 1, 1, 0.2);*/
    align-self: start;
    position: sticky;
    top: 0px;
    hyphens: none;

    ul {
        margin: 0;
        list-style: none !important;

        li {
            line-height: 1.2em;
            margin-bottom: 1em;
            hyphens: none !important;
            font-size: 87.5%;

            a {
                color: var(--brandSecondary);
                text-transform: none;
                display: inline-block;
                transform-origin: left;
                transition: transform 0.1s linear;
                text-decoration: none;
                border-bottom: 0;
                transition: all(0.5s);

                &:link {
                    color: var(--brandSecondary);
                    text-decoration: none;
                    border-bottom: 0;
                    transition: all(0.5s);
                }

                &:visited {
                    color: var(--brandSecondary);
                    text-decoration: none;
                    border-bottom: 0;
                    transition: all(0.5s);
                }

                &:hover {
                    color: var(--brandSecondary);
                    font-weight: 600;
                    text-decoration: none;
                    border-bottom: 0;
                    background: none;
                    transition: all(0.5s);
                }

                &.active {
                    color: var(--brandPrimary);
                    font-weight: 600;
                    transform: scale(1.1);
                    transition: all(0.5s);
                    text-transform: uppercase;
                    font-size: 0.875em;
                    letter-spacing: 0.05em;
                }
            }
        }
    }
}

aside h3 {
    width: 100%;
    font-size: 75%;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--brandSecondary);
    padding-bottom: 0.75rem;
}

/* MAIN BLOCK STYLING */

main h2 {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1rem 0 0.75rem 0;
    border-bottom: 1px var(--brandSecondary) solid;
    margin: 0 0 0.75rem 0;
}

main ul,
main ol {
    padding: 0 0 1em 1.5em;
}

main ol li,
main ul li {
    width: 100%;
}

h1,
h2 {
    color: var(--brandPrimary);
    letter-spacing: -0.02em;
}

/* TABLE STYLING */

table {
    table-layout: fixed;
    width: 100%;
    margin: 0 0 1em 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px var(--brandPrimary) solid;
    border-radius: 0.5rem;
}

table th,
table td,
table caption {
    padding: 0.375em 0.5em;
    font-size: 0.8rem;
    line-height: 1.2em;
    vertical-align: top;
    hyphens: auto;
}

table td ul,
table td ol {
    margin: 0;
}

table li {
    font-size: 0.8rem;
    line-height: 1.2em;
    width: auto !important;
}

table th {
    text-align: left;
}

table.numLast td:last-child,
table.numLast th:last-child {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

table thead tr,
table thead th {
    background-color: var(--brandPrimary);
    color: white;
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05rem;
    padding: 0.4rem 0.4rem;
    vertical-align: bottom;
}

table thead th,
table tbody th,
table tbody td {
    margin-right: 0.2em;
}

table thead:first-of-type th:first-child {
    border-top-left-radius: 0.5rem;
}

table thead:first-of-type th:last-child {
    border-top-right-radius: 0.5rem;
    margin-right: 0;
}

table tbody tr:last-child th:first-child,
table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 0.5rem;
}

table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
}

table tbody tr {
    background-color: #f4f4f4;
}

table tbody tr:nth-of-type(2n-1) {
    background-color: #fff;
}

table.odd tbody tr {
    background-color: #fff;
}

table.odd tbody tr:nth-of-type(2n-1) {
    background-color: #f4f4f4;
}

table.hasTotal tbody tr:last-child th,
table.hasTotal tbody tr:last-child td {
    background-color: #ccc;
    border-top: 1px var(--brandPrimary) dotted;
}

.tnum {
    font-size: 0.625rem !important;
    text-align: right;
    line-height: 1rem;
    font-feature-settings:
        "tnum" 0,
        "zero" 1;
}

.tnum:first-line {
    font-size: 0.75rem;
    line-height: 1rem;
    font-feature-settings:
        "tnum" 0,
        "zero" 1;
}

table th.rAlign {
    padding-left: 0;
    padding-right: 0.2em;
    text-align: right;
}

table th.rAlign::after {
    content: ("WTF");
}

.fiveW {
    width: 5%;
}

.tenW {
    width: 10%;
}

.fifteenW {
    width: 15%;
}

.twentyW {
    width: 20%;
}

.twentyFiveW {
    width: 25%;
}

.thirtyW {
    width: 30%;
}

.thirtyFiveW {
    width: 35%;
}

.fortyW {
    width: 40%;
}

.fortyFiveW {
    width: 45%;
}

.fiftyW {
    width: 50%;
}

.sixtyW {
    width: 60%;
}

table.rubric thead th {
    background-color: #ccc;
    color: black;
    font-size: 0.625em;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    vertical-align: bottom;
}

table.rubric tbody td::first-line {
    font-weight: 700;
}

table.sched tbody th:first-of-type {
    font-weight: 400;
}

table.sched tbody th::first-line {
    font-weight: 700;
}

main h2 + table {
    margin-top: 0.5em;
}

caption {
    text-align: left;
    caption-side: bottom;
}

/* SECTIONS */

section {
    padding-bottom: 0em;
    /*    border-bottom: 1px var(--brandSecondary) solid;*/
    margin-bottom: 0;
}

section p:last-child {
    margin-bottom: 0;
}

main h2 + p,
main h2 + table {
    margin-top: 0;
}

#gradBox p.xbevel {
    text-shadow:
        0 0 1px gold,
        0 0 1px gold,
        1px 0 0 brown,
        0 1px 0 brown,
        -1px 0 0 gold,
        0 -1px 0 gold;
}

/* FOOTER BLOCK STYLING */

footer {
    color: var(--brandSecondary);
    padding: 0 0 1em 0;
    margin-bottom: 1em;
    width: 100%;
}

#docInfo {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#separator {
    width: 4rem;
    height: 0;
    border-top: 0.5rem var(--brandSecondary) solid;
    margin: 0 0 0.5rem 0;
}

footer #separator {
    margin-top: 1rem;
}

header #separator {
    margin: 0;
}

/* ADDITIONAL STYLING */

ul + p,
ol + p {
    margin-top: 1em;
}

.hi1 {
    background-color: var(--hilight1);
}

.hi2 {
    background-color: var(--hilight2);
}

.hi3 {
    background-color: var(--hilight3);
}

.references p {
    margin-left: 2em;
    text-indent: -2em;
}

h3#courseID a,
h3#courseID a:link,
h3#courseID a:hover,
h3#courseID a:visited {
    text-decoration: none;
    color: var(--brandSecondary);
    border: none;
}

/* dw NOTE CSS */

p.note {
    font-size: 75%;
    line-height: 1.5em;
    background-color: #fff888 !important;
    padding: 1em;
    margin: 1.5em;
    border: 1px #888444 solid;
    border-radius: 1em;
}

p.note::before {
    display: block;
    content: "NOTE: ";
    color: #fff888;
    font-weight: bold;
    margin: -1.05em -1.05em 1em -1.05em;
    padding: 0 1em 0 1em;
    background-color: #888444;
    border-radius: 1em 1em 0 0;
    border: 1px #888444 solid;
}

/* NAV MENU FOR SMALL SCREENS */

nav {
    position: fixed;
    z-index: 128;
    font-size: 1rem;
    color: var(--brandPrimary);
    display: none;
    align-self: start;
    justify-self: start;
    padding-top: 1em;
    padding-left: 0.5em;
}

#nav-trigger,
#nav-trigger2 {
    display: none;
}

label[for="nav-trigger"] {
    position: fixed;
    right: 0.5rem;
    top: 1rem;
    z-index: 220;
    cursor: pointer;
}

label[for="nav-trigger2"] {
    font-weight: bold;
    position: fixed;
    left: 0.2rem;
    top: 1.1rem;
    z-index: 220;
    cursor: pointer;
}

nav ul {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    list-style-type: none;
    padding: 0.7rem 0 0 0;
    margin: 0 0 0 0;
    width: 8rem;
    height: auto;
    position: fixed;
    /*    top: 2.2rem;*/
    top: 0;
    left: -12rem;
    bottom: 0;
    z-index: 0;
    text-align: left;
    border-right: 1px var(--brandSecondary) solid;
}

nav li {
    width: 100%;
    margin: 0;
}

nav a {
    display: block;
    /*    width: 100%;*/
    text-decoration: none;
    padding: 6px 1em 6px 2em;
    margin-left: 0;
    color: #000;
    font-size: 1rem;
    font-weight: bold;
    border-bottom: 0;
}

nav a:hover {
    color: var(--brandSecondary);
    background-color: none;
    transition: all 0.4s;
}

nav a:active {
    background-color: rgba(255, 255, 255, 0) !important;
}

nav a.current {
    color: var(--brandSecondary);
    cursor: pointer;
}

.nav-trigger + label,
.navigation {
    transition: left 0.4s;
}

.nav-trigger2:checked + label {
    left: 10rem;
}

.nav-trigger2:checked ~ .navigation {
    left: 0;
}

#burger {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    padding: 0 0.5em;
    z-index: 255;
}

.bun1 {
    background: var(--brandPrimary);
    width: 100%;
    height: 25%;
    transform: rotateY(0deg);
}

.bun2 {
    background: var(--brandPrimary);
    width: 100%;
    height: 25%;
    transform: rotateY(0deg);
}

.meat1 {
    background: var(--brandPrimary);
    width: 100%;
    height: 25%;
    margin-top: 10%;
    margin-bottom: -25%;
    transform: rotate(0deg);
}

.meat2 {
    background: var(--brandPrimary);
    width: 100%;
    height: 25%;
    margin-top: -25%;
    margin-bottom: 10%;
    transform: rotate(0deg);
}

.nav-trigger2 + label,
.bun1,
.bun2,
.meat1,
.meat2 {
    transition: all 0.4s;
}

.nav-trigger2:checked + label {
}

.nav-trigger2:checked ~ label {
    color: var(--brandSecondary);
}

.nav-trigger2:checked + label {
}

.nav-trigger2:checked ~ label .meat1 {
    transform: rotate(45deg);
    background-color: var(--brandSecondary);
}

.nav-trigger2:checked + label {
}

.nav-trigger2:checked ~ label .meat2 {
    transform: rotate(-45deg);
    background-color: var(--brandSecondary);
}

.nav-trigger2:checked + label {
}

.nav-trigger2:checked ~ label .bun1 {
    transform: rotateY(90deg);
    background-color: var(--brandSecondary);
}

.nav-trigger2:checked + label {
}

.nav-trigger2:checked ~ label .bun2 {
    transform: rotateY(90deg);
    background-color: var(--brandSecondary);
}

/* ADJUSTMENTS FOR DIFFERENT SCREEN SIZES */

@media screen and (max-width: 480px) {
    #qrcode {
        display: none;
    }

    #overviewBlock blockquote,
    #overviewBlock p {
        grid-column: 1 / 3;
    }
}

@media screen and (max-width: 768px) {
    :root {
        font-size: 16px;
    }

    header #courseInfo h3 {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
    }

    header #courseInfo h1 {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
    }

    body {
        display: grid;
        grid-template-columns: 2rem 0 auto 2rem;
        grid-gap: 0;
        transition: all 0.5s;
    }

    aside {
        display: none;
    }

    nav {
        display: block;
    }

    main h2 {
        position: sticky;
        top: -1px;
    }

    table th,
    table td {
        font-size: 11px;
    }
}

@media screen and (min-width: 769px) {
    :root {
        /*        font-size: 14px;*/
    }

    body {
        display: grid;
        grid-template-columns: 1rem 13rem auto 1rem;
        grid-gap: 1rem;
        transition: all 0.5s;
    }

    aside {
        display: grid;
    }

    aside ul li {
        transition: all 0.5s;
    }
}

@media screen and (min-width: 800px) {
    :root {
        /*        font-size: 14px;*/
    }

    body {
        display: grid;
        grid-template-columns: 1fr 13rem 30rem 2fr;
        grid-gap: 1rem;
        transition: all 0.5s;
    }

    aside {
        display: grid;
    }

    aside ul li {
        width: 12rem;
        transition: all 0.5s;
    }
}

@media screen and (min-width: 1025px) {
    :root {
        font-size: clamp(1rem, 0.7137rem + 0.4469vw, 1.25rem);
    }
}
