@font-face {
    font-family: 'Figtree';
    src: url('assets/fonts/Figtree-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;  /* Variable font weight range */
    font-style: normal;
}

@font-face {
    font-family: 'Figtree';
    src: url('assets/fonts/Figtree-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
}

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

body {
    min-height: 100vh;
    background-color: hsl(47, 88%, 63%);
    font-family: "Figtree";
}

.container {
    /* dimensions */
    min-height: 100vh;

    /* layouts */
    display: flex;
    justify-content: center;
    align-items: center;
}

.card {
    background-color: hsl(0, 0%, 100%);
    height: 522px;
    width: 384px;
    border-radius: 20px;
    border: 1px solid hsl(0, 0%, 7%);
    /* shadow */
    box-shadow: 8px 8px 0px hsl(0, 0%, 7%);

    /* layout */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;

    /* internals */
    padding: 20px;
}

/* TOP */

.card-image {
    height: 200px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;  /* Add this to clip the image to rounded corners */
}

.card-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;  /* Use 'cover' to fill and crop, or 'contain' to fit without cropping */
    display: block; /* Removes small gap below image */
}

/* BOTTOM */

.card-author {
    display: flex;
    justify-content: space-between;
    /* for pic and text */
    align-items: center;
    gap: 12px;
    width: 145px;
}

.card-avatar {
    height: 32px;
    width: 32px;
    /* border-radius: 50px; */
}

.card-author p {
    color: hsl(0, 0%, 7%);
    font-size: 16px;
    font-weight: 800;
}

.card-avatar img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
}


/* CENTER */
.card-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;  /* Modern, clean approach */
}

.tag p {
    display: inline-block; /* shrink to just text */
    background-color: hsl(47, 88%, 63%);
    padding: 4px 12px;
    border-radius: 4px;
    color: hsl(0, 0%, 7%);
    font-weight: 800;
    font-size: 16px;
}

.card-text h1 {
    font-size: 24px;
    font-weight: 800;
    color: hsl(0, 0%, 7%);
    line-height: 1.5;
}

.card-text h1:hover {
    color: hsl(47, 88%, 63%);
    /* cursor: pointer; */
    transition: color 0.3s ease;
}

.card-text .description {
    font-size: 16px;
    font-weight: 500;
    color: hsl(0, 0%, 42%);
}

.card-text .published {
    font-size: 14px;
    font-weight: 500;
    color: hsl(0, 0%, 7%);
}

@media (max-width: 375px) {
    .card {
        width: 327px;
        height: 501px;
    }
}
