/* Variables for colors from style-guide.md */
:root {
    --clr-yellow: hsl(47, 88%, 63%);
    --clr-white: hsl(0, 0%, 100%);
    --clr-gray-500: hsl(0, 0%, 42%); /* For paragraph text */
    --clr-gray-950: hsl(0, 0%, 7%);  /* For text, background */
}

/* * 1. Global Reset & Setup 
 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: grid;
    place-content: center; /* Centers the card */
    background-color: var(--clr-yellow);
    font-family: 'Figtree', sans-serif;
    padding: 1.5rem; /* Add padding for smaller screens */
}

.container {
    /* Ensures the card doesn't touch the edges on very large screens */
    max-width: 1440px; 
    width: 100%;
    display: grid;
    place-items: center;
}

/* Attribution styling */
.attribution {
    position: absolute;
    bottom: 0.5rem;
    width: 100%;
}

/* * 2. Blog Card Structure 
 */
.blog-card {
    background-color: var(--clr-white);
    max-width: 384px; /* Card width from desktop design */
    border: 1px solid var(--clr-gray-950);
    border-radius: 20px;
    padding: 1.5rem; /* 24px padding */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    
    /* Default box shadow: creates a black border and a yellow shadow */
    box-shadow: 8px 8px 0px 0px var(--clr-gray-950); 
    
    /* Add a transition for the hover effect */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* * Interactive State 1: Card Hover/Focus 
 * Changes the shadow and lifts the card 
 */
.blog-card:hover,
.blog-card:focus-within {
    box-shadow: 16px 16px 0px 0px var(--clr-gray-950);
    transform: translate(-4px, -4px); /* Slight lift */
    cursor: pointer;
}

.card-image {
    width: 100%;
    border-radius: 10px;
}

/* * 3. Card Content and Typography 
 */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Space between content elements */
}

.tag {
    background-color: var(--clr-yellow);
    color: var(--clr-gray-950);
    font-weight: 800;
    font-size: 0.875rem; /* 14px */
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    align-self: flex-start; /* Makes the background only wrap the text */
}

.publish-date {
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    color: var(--clr-gray-950);
}

.card-title {
    color: var(--clr-gray-950);
    font-size: 1.5rem; /* 24px */
    font-weight: 800;
    text-decoration: none; /* Remove underline from anchor tag */
    line-height: 1.5;
}

.card-description {
    color: var(--clr-gray-500);
    font-size: 1rem; /* 16px - Base font size as per style guide */
    font-weight: 500;
    line-height: 1.5;
}

/* * Interactive State 2: Title Hover/Focus 
 * Changes the color of the link 
 */
.card-title:hover,
.card-title:focus {
    color: var(--clr-yellow);
    outline: none; /* Remove default focus outline if needed, but ensure visibility */
}

/* * 4. Author Profile 
 */
.author-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
}

.author-name {
    font-weight: 800;
    font-size: 0.875rem; /* 14px */
    color: var(--clr-gray-950);
}