/* ===========================================================
   Global variables
   =========================================================== */
* {
    --sub-text-color: #222;
    --url-color: #4a4b54;
    --url-hover-color: #5d5e68;
}

body {
    padding-top: 60px;
}

hr {
    width: 30vw;
}

/* Links: use the theme color and lighten slightly on hover */
a {
    color: var(
        --url-color
    ); /* fixed typo: was var(--url-colors), which doesn't exist */

    &:hover {
        color: var(--url-hover-color);
    }
}

/* ===========================================================
   Layout helpers
   =========================================================== */

/* Generic centered column container, reused across sections */
.containerDiv {
    display: flex;
    flex-direction: column;
    align-items: center;

    /* Row of skill pills, wraps and centers */
    .skillsDiv {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        justify-content: center;
        gap: 5px;
    }
}

/* Individual skill "pill" badge. Background color is set per-instance
   via the --color custom property (see inline style in HTML). */
.skill {
    padding: 2px;
    background-color: var(--color);
    border: 3px solid color-mix(in srgb, var(--color), black 20%);
    border-radius: 5px;

    transition: all 0.2s;
    &:hover {
        scale: 1.3;
    }
}

/* ===========================================================
   Intro section
   Includes: photo, name, graduation, links, about-me title/intro
   =========================================================== */
#intro {
    /*background-color: cornsilk;*/

    img {
        border-radius: 5px;
    }

    #pHey {
        color: var(--sub-text-color);
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }

    h1 {
        font-size: 3rem;
        margin: -10px 0;
    }

    sup {
        color: var(--sub-text-color);
        margin-bottom: 2rem;
    }

    h2 {
        margin: 2rem 0 0 0;
    }

    #pField {
        margin: 0;
    }

    margin-bottom: 0.5rem;
}

/* ===========================================================
   About Me section
   Two-column grid of info blocks (lists or skill pills)
   =========================================================== */
#aboutMe {
    padding: 0 10vw;

    #aboutMeContainer {
        display: grid;
        grid-template-columns: repeat(2, 1fr);

        div p {
            font-weight: bold;
            margin-bottom: 0.3rem;
        }

        ul,
        div {
            margin-top: 0;
        }
    }
}

/* ===========================================================
   Projects section
   Grid of project cards
   =========================================================== */
#projectsDiv {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1vw;
    padding: 2px;
    max-width: 80vw;
    margin-bottom: 2rem;

    .projectBox {
        border: solid 1px black;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        border-radius: 5px;

        width: 215px;
        aspect-ratio: 4/2.6;
        overflow: hidden;
        padding: 0.5rem 1rem;

        h3 {
            margin-top: 0;
            margin-bottom: 0.2rem;
        }

        p {
            margin-top: 0;
            font-size: 0.9rem;
        }

        sub {
            font-size: 0.8rem;
            text-decoration: underline;
        }

        /* Row of skill pills shown inside each project card */
        .skillBox {
            padding-top: 6px;
            font-size: 0.7rem;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            margin-bottom: 0.25rem;
            gap: 5px;
        }
    }
}

/* ===========================================================
   Students directory section (index page)
   Grid of student cards, each linking to that student's page
   =========================================================== */
#studentsDiv {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5vw;
    padding: 2px;
    max-width: 80vw;
    margin: 0 auto 2rem auto;
}

.studentCard {
    /* Same card language as .projectBox, so cards feel consistent site-wide */
    border: solid 1px black;
    border-radius: 5px;
    overflow: hidden;
    width: 180px;
    text-align: center;
    text-decoration: none;
    color: inherit;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding-bottom: 0.75rem;

    transition: all 0.2s;
    &:hover {
        scale: 1.05;
        border-color: var(--url-color);
    }

    img {
        width: 100%;
        aspect-ratio: 1/1;
        object-fit: cover;
        margin-bottom: 0.5rem;
    }

    h3 {
        margin: 0 0.5rem 0.2rem 0.5rem;
        font-size: 1rem;
    }

    p {
        margin: 0 0.5rem;
        font-size: 0.8rem;
        color: var(--sub-text-color);
    }
}

/* ===========================================================
   Contact section
   =========================================================== */
#contact {
    text-align: center;
    margin-top: 2rem;

    h3 {
        margin-top: 0;
    }

    div {
        display: flex;
        flex-direction: column;

        p {
            margin: 0;
        }
    }
}
