*,
*::before, /* apply border-box to everything, including pseudo-elements (::before, ::after), which are CSS-generated elements */
*::after {
  box-sizing: border-box;
}

:root {
  --focus-color: #2563eb; /* accessible, high-contrast blue */
  --focus-width: 3px;
}

/* Apply to all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none; /* remove default outline to use custom ring */
  box-shadow: 0 0 0 var(--focus-width) color-mix(in srgb, var(--focus-color) 40%, transparent 60%); /* soft glow */
  border-radius: 4px; /* match component shape */
  /* Optionally also change background/border for stronger contrast */
  border: 2px solid var(--focus-color); /* clear visible boundary */
}

html {
  font-size: 16px;  /*using rem for paddings and sizings so 1rem=16px*/
  font-family: Figtree;
}

body {
  background-color: #F4D04E;
  margin:0;
  min-height: 100dvh; /*dynamic viewport height*/
}

/* Using main for good practice. Think about having multiple of the card components, you would use display grid for example, and avoid the card-container  and just use the cards component*/
main {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-container {
  padding: 0 1.25rem; /* Use padding instead of setting a width, set the width only for desktop. */
}

.card {
  background-color: #FFFFFF;
  border: 1px solid #111111;
  border-radius: 1.25rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 24rem; /*Use max width for the desktop view*/
  font-size: 14px;
  line-height: 1.5;
  gap: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 8px 0 rgba(17, 17, 17, 1);
}

.card h1 {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem);
  margin:0;
}

.card p {
  margin: 0;
}

.content {
  display: flex;
  gap: 0.75rem;
  flex-direction: column;
}

.category {
  align-self: flex-start;
  font-weight: bold;
  background-color: #F4D04E;
  padding: 0.25em 0.75em;
  border-radius: 0.25rem;
  line-height: 1.5;
  font-size: clamp(0.75rem, 0.75rem + 0.5vw, 0.875rem);
}
/* clamp(min, fluid, max)
- min: smallest size (mobile)
- fluid: scales with viewport (uses vw)
- max: largest size (desktop)
→ creates smooth scaling between min and max */

.image {
  width:100%;
  max-width: 100%;
  overflow: hidden;
  height: auto;
}

.image img{
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: 0.8rem;
  display:block;
}

.author {
  display: flex;
  align-items:center;
  gap: 0.75rem;
  font-size: clamp(0.75rem, 0.75rem + 0.5vw, 0.875rem);
  font-weight: bold;
}

.avatar {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0; /* prevents shrinking */
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%; /* makes it circular */
  display: block;
}






.attribution {
  display: none;
}