/* =========================================
   RESOURCEZ — MAIN STYLES
========================================= */


/* ---------- RESET ---------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Courier New", Courier, monospace;
    background: #f8f5ef;
    color: #29272a;
    line-height: 1.6;
}


/* ---------- GENERAL ---------- */

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

main {
    width: min(1100px, 90%);
    margin: 0 auto;
}

section {
    padding: 80px 0;
}


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

header {
    border-bottom: 1px solid #29272a;
}

body > header {
    width: 100%;
}

body > header nav {
    width: min(1100px, 90%);
    margin: 0 auto;
    min-height: 80px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

body > header nav > a {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 0.08em;
}

body > header nav ul {
    display: flex;
    gap: 30px;
}

body > header nav ul a {
    font-size: 0.9rem;
}

body > header nav ul a:hover {
    text-decoration: underline;
}


/* =========================================
   HERO
========================================= */

#hero {
    min-height: 75vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    border-bottom: 1px solid #29272a;
}

#hero > p:first-child {
    background: #d9e8ff;
    padding: 7px 12px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    margin-bottom: 25px;
}

#hero h1 {
    font-size: clamp(4rem, 12vw, 9rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
    margin-bottom: 30px;
}

#hero > p:nth-of-type(2) {
    max-width: 600px;
    font-size: 1.1rem;
    margin-bottom: 35px;
}

#hero > a {
    display: inline-block;
    border: 1px solid #29272a;
    padding: 12px 20px;
    background: #f6cde1;
    transition: 0.2s ease;
}

#hero > a:hover {
    transform: translate(4px, 4px);
    box-shadow: -4px -4px 0 #29272a;
}


/* =========================================
   SECTION HEADINGS
========================================= */

section > header {
    border: none;
    margin-bottom: 35px;
}

section > header p {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
    opacity: 0.65;
}

section > header h2 {
    font-size: 2.5rem;
    letter-spacing: -0.05em;
}


/* =========================================
   COURSE GRID
========================================= */

#courses {
    border-bottom: 1px solid #29272a;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}


/* COURSE CARD */

.course-card {
    min-height: 280px;

    border: 1px solid #29272a;

    padding: 25px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    position: relative;

    transition: 0.2s ease;
}


/* PASTEL COLOURS */

.course-card.econ {
    background: #fff0b8;
}

.course-card.calculus {
    background: #d9e8ff;
}

.course-card.linear {
    background: #d9f0df;
}

.course-card.writing {
    background: #f6cde1;
}


/* COURSE NUMBER */

.course-number {
    font-size: 0.7rem;
    opacity: 0.6;
}


/* COURSE CODE */

.course-card p {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    margin-bottom: 5px;
    opacity: 0.65;
}


/* COURSE NAME */

.course-card h3 {
    font-size: 1.8rem;
    letter-spacing: -0.04em;
}


/* ARROW */

.course-card .arrow {
    position: absolute;

    right: 25px;
    bottom: 20px;

    font-size: 1.5rem;
}


/* HOVER */

.course-card:hover {
    transform: translate(-5px, -5px);
    box-shadow: 5px 5px 0 #29272a;
}


/* MOBILE */

@media (max-width: 700px) {

    .course-grid {
        grid-template-columns: 1fr;
    }

    .course-card {
        min-height: 220px;
    }

}
/* =========================================
   RESOURCE BUTTONS
========================================= */

#courses article nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#courses article nav a {
    display: inline-block;

    background: #f8f5ef;
    border: 1px solid #29272a;

    padding: 8px 14px;

    font-size: 0.75rem;

    transition: 0.2s ease;
}

#courses article nav a:hover {
    background: #29272a;
    color: #f8f5ef;
}


/* =========================================
   RESOURCE TYPES
========================================= */

#resources {
    border-bottom: 1px solid #29272a;
}

#resources ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

#resources li a {
    display: block;

    border: 1px solid #29272a;
    padding: 25px;

    background: #e7dafa;

    transition: 0.2s ease;
}

#resources li:nth-child(2) a {
    background: #d9e8ff;
}

#resources li:nth-child(3) a {
    background: #fff0b8;
}

#resources li:nth-child(4) a {
    background: #d9f0df;
}

#resources li a:hover {
    transform: translate(-4px, -4px);
    box-shadow: 4px 4px 0 #29272a;
}


/* =========================================
   ABOUT
========================================= */

#about {
    max-width: 750px;
}

#about p {
    font-size: 1rem;
    margin-bottom: 20px;
}


/* =========================================
   FOOTER
========================================= */

footer {
    border-top: 1px solid #29272a;

    width: 100%;
    padding: 35px 5%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 0.7rem;
}

footer p:first-child {
    font-weight: bold;
    letter-spacing: 0.1em;
}

footer p:nth-child(2) {
    opacity: 0.6;
}


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

@media (max-width: 700px) {

    body > header nav {
        min-height: 70px;
    }

    body > header nav ul {
        gap: 15px;
    }

    body > header nav ul a {
        font-size: 0.75rem;
    }

    #hero {
        min-height: 70vh;
    }

    #hero h1 {
        font-size: 4rem;
    }

    #hero > p:nth-of-type(2) {
        font-size: 0.9rem;
    }

    section {
        padding: 60px 0;
    }

    section > header h2 {
        font-size: 2rem;
    }

    #courses > article {
        padding: 22px;
    }

    #resources ul {
        grid-template-columns: 1fr;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* =========================================
   COURSE PAGE
========================================= */

.course-page {
    min-height: 80vh;
    padding-top: 60px;
}


/* BACK BUTTON */

.back-link {
    display: inline-block;

    font-size: 0.75rem;

    margin-bottom: 70px;

    border-bottom: 1px solid #29272a;
}

.back-link:hover {
    opacity: 0.5;
}


/* COURSE HEADER */

.course-code {
    font-size: 0.8rem;
    letter-spacing: 0.15em;

    opacity: 0.6;

    margin-bottom: 10px;
}

.course-page h1 {
    font-size: clamp(3rem, 8vw, 7rem);

    line-height: 0.95;

    letter-spacing: -0.07em;

    margin-bottom: 25px;
}

.course-description {
    max-width: 600px;

    font-size: 1rem;

    margin-bottom: 60px;
}


/* RESOURCE LIST */

.resource-list {
    border-top: 1px solid #29272a;
}

.resource-item {
    min-height: 80px;

    border-bottom: 1px solid #29272a;

    display: grid;

    grid-template-columns: 60px 1fr 40px;

    align-items: center;

    padding: 15px 0;

    transition: 0.2s ease;
}

.resource-item span:first-child {
    font-size: 0.7rem;
    opacity: 0.5;
}

.resource-item strong {
    font-size: 1rem;
    font-weight: normal;
}

.resource-item span:last-child {
    font-size: 1.2rem;
    text-align: right;
}

.resource-item:hover {
    padding-left: 15px;
    padding-right: 15px;

    background: #fff0b8;
}


/* MOBILE */

@media (max-width: 700px) {

    .course-page {
        padding-top: 40px;
    }

    .back-link {
        margin-bottom: 50px;
    }

    .course-page h1 {
        font-size: 3.5rem;
    }

    .resource-item {
        grid-template-columns: 40px 1fr 30px;
    }

}