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

@font-face {
  font-display: swap;
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 500;
  src: url('./assets/fonts/figtree-v9-latin-500.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 800;
  src: url('./assets/fonts/figtree-v9-latin-800.woff2') format('woff2');
}

:root {
    --yellow: hsl(47, 88%, 63%);
    --white: hsl(0, 0%, 100%);
    --gray500: hsl(0, 0%, 42%);
    --gray950: hsl(0, 0%, 7%);
}

/*            Base / mobile styling           */

body {
    background-color: var(--yellow);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Figtree', sans-serif;
    font-weight: 500;
}

.card {
    max-width: 320px;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--gray950);
    box-shadow: 0.5rem 0.5rem 0 0 var(--gray950);
    text-decoration: none;
}

.imgcontainer {
    width: 100%;
    text-align: center;
    overflow: hidden;
    border-radius: 1rem;
}

.illustration {
    position: relative;
    left: 50%;
    transform: translate(-50%,0);
    border-radius: 1rem;
}

p {
    font-size: clamp(0.8rem, 2vw, 16px);
    color: var(--gray950);
}

h1 {
    font-size: clamp(20px, 2.5vw, 1.5rem);
    color: var(--gray950);
    margin: 1rem 0;
}

a {
    text-decoration: none;
}

a:hover h1 {
    color: var(--yellow);
}

.learning {
    background-color: var(--yellow);
    display: inline-block;
    border-radius: 0.3rem;
    padding: 0.4rem 0.8rem;
    margin-top: 1.5rem;
}

.date {
    margin-top: 1rem;
}

.description {
    color: var(--gray500);
    line-height: 1.5;
}

.user {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.user img {
    width: 2rem;
    height: auto;
}

.heavy {
    font-weight: 800;
}

/*            Card size scaling for larger screens           */

@media only screen and (min-width: 576px) {
    .card {
        /* max-width: 384px; */
        max-width: clamp(320px, 38vw, 384px);
    }
}
