:root {
    /* base */
    --background: #1c1f39;
    --dark-bg: #030712;
    --text-light: #e2e8f0;
    --color-accent: #facc15;
    --text-muted: #9CA3AF;

    /* ----- Spacing System ----- */
    --space-xs: 0.5rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* ----- Border Radius ----- */
    --radius-lg: 12px;

    /* ----- Typography ----- */
    --font-family-base: "Inter", sans-serif;
    --font-family-title: "Merriweather", serif;

    /* ----- Font weights ----- */
    --weight-regular: 400;

    /* ----- Transition ----- */
    --transition-fast: 150ms ease;
}

body {
    margin: 0;
    padding: 0;
    background-image: linear-gradient(to bottom, var(--background),
            var(--dark-bg));
    background-size: cover;
    min-height: 100vh;
    color: var(--text-light);
    font-family: var(--font-family-base);
    font-weight: var(--weight-regular);
    box-sizing: border-box;
    line-height: 1.6;
}

@supports (min-height: 100dvh) {
    body {
        min-height: 100dvh;
    }
}

h1{
    text-align: center;
    font-family: var(--font-family-title);
}

h2{
    font-weight: var(--weight-regular);
    font-style: italic;
}

/* --- accessibility --- */

:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}

/* ---- links ---- */

a{
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast)
}

a:hover{
    text-decoration: underline;
}

a:active{
    color: var(--text-muted)
}

/* --- nav bar --- */

.projects-navigation{
    margin: 15px;
}

.projects{
    display: grid;
    grid-template-columns: 1fr;
    padding: 0;
    gap: var(--space-xl);
    list-style: none;
}

/* --- cards --- */

.card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition-fast);
    max-height: 75%;
}

.card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: var(--space-xs)
}

.card h3{
    margin: 0;
}

.card p{
    margin-top: auto;
}

.card:hover{
    border-color: var(--color-accent);    
}

/* --- media query */

@media (min-width: 640px) {
    .projects {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}