/* ========================================
   TOKENS
   Define your design decisions here.
   Everything else in this file should
   reference these tokens with var().
   ======================================== */
:root {
    /* Colors: at least primary, background, text, accent */
    --color-bg:  #fdf4ff;
    --color-surface: #ffffff;
    --color-text: #3b0764;
    --color-primary: #9333ea;
    --color-primary-hover: #7e22ce;
    --color-link: #9333ea;
    --color-muted: #a78bfa;

    /* Spacing: at least sm, md, lg */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;

    /* Typography: font family, base size */
    --font-body: system-ui, -apple-system, sans-serif;
    --text-small: 0.875rem;
    --text-lg: 1.25rem;
    --text-xl: 1.75rem;
    
    /* Borders: radius */
    --border-radius: 5px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);

    }

/* ========================================
   RESET
   A minimal reset so you start clean.
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ========================================
   BASE STYLES
   Style the body, links, and any raw
   HTML elements here. Use nesting.
   ======================================== */
body {
    /* font family, color, background, line-height, padding */
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    padding: var(--space-lg);
    /* Use clamp() for padding to make it fluid. */
    padding: clamp(var(--space-md), 5vw, var(--space-lg));

    a {
        /* link color from tokens */
        color: var(--color-link);
        text-decoration: none;


        &:hover {
            /* hover color from tokens */
            color: var(--color-primary-hover)
        }
    }
}

/* ========================================
   NAVIGATION
   Style .site-nav so students can get
   back to the homepage.
   ======================================== */
.site-nav {
    /* padding, margin-bottom */
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

/* ========================================
   BOARD HEADER
   Style the page header area.
   ======================================== */
.board-header {
    /* text alignment, margin, padding */
    /* Use clamp() for the h1 font size. */
    padding: var(--space-md);
    margin: var(--space-lg);
    text-align: center;

    h1 {
        /* fluid font size */
        font-size: clamp(2.4rem, 6vw, 3.6rem);
        color: var(--color-primary);
    }

    p {
        /* muted text color, spacing */
        padding-top: var(--space-lg);
        color: var(--color-muted,#6b7280);
    }
}

/* ========================================
   CARD GROUP
   Each section of cards (This Week,
   Coming Up, Announcements).
   ======================================== */
.card-group {
    /* margin-bottom using a token */
    margin-bottom: var(--space-lg);
    h2 {
        /* section heading styles */
        color: var(--color-primary);
        font-size: var(--text-xl);
        margin-bottom: var(--space-md);
    }
}

/* ========================================
   CARDS GRID
   Layout the .cards container as a
   responsive grid or flex layout.
   ======================================== */
.cards {
    /* display, gap (use calc to derive from a token), columns */
    display: grid;
    gap: calc(var(--space-md) * 2);
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    @media (width >= 768px) {
        grid-template-columns: repeat(2, 1fr);
    }
    @media (width >= 1024px) {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   INDIVIDUAL CARD
   Style each .card article. This is where
   most of your nesting will happen.
   ======================================== */
.card {
    /* background, padding, border-radius, shadow */
    /* Use a var() with a fallback value here. */
    background-color:var(--color-surface);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    box-shadow: var(--shadow-md, 0 12px 12px rgba(0, 0, 0, 0.1));
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    .card-tag {
        /* small label: font-size, padding, background, border-radius */
        font-size: var(--text-small);
        padding: var(--space-sm);
        background-color: var(--color-primary);
        color: var(--color-surface);
        border-radius: var(--border-radius);
    }

    h3 {
        /* card title styles */
        padding: var(--space-sm) 0;
    }

    p {
        /* card body text */
        font-size: var(--text-small);
    }
    &:hover {
        /* hover effect: maybe a transform and shadow change */
        transform: translateY(-5px);
        box-shadow: var(--shadow-md, 0 12px 12px rgba(0, 0, 0, 0.1)), 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .card-meta {
        /* bottom row: flexbox with space-between */
        /* style the span and link inside here with nesting */
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: var(--space-md);
    
            span {
                /* date or other meta info */
                font-size: var(--text-small);
                color: var(--color-muted);
            }
    
            a {
                /* link to details */
                color: var(--color-link);
                font-weight: bold;
    
                &:hover {
                    color: var(--color-primary-hover);
                }
            }
    }
}

/* ========================================
   FOOTER
   Style the .board-footer at the bottom.
   ======================================== */
.board-footer {
    /* text alignment, padding, muted color, top border */
    text-align: center;
    padding: var(--space-md);
    color: var(--color-muted);
    border-top: 1px solid var(--color-muted);
}