/* Projects — builds on theme.css (section, headings, article). Everything snaps to the 8px unit;
   the pixel is 4px, matching the theme's border and shadow. */

/* Bitmap type for short strings only. Yellow clears 4.5:1 on --bg and on --surface. */
#projects .projects-label {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 24px;
  color: #FFCD75;
  margin: 0 0 16px;
}

#projects .projects-title {
  font-family: var(--font-mono);
  font-size: 24px;
  line-height: 40px;
  margin: 0 0 32px;
}

#projects .projects-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
#projects .projects-list li { max-width: none; }

/* The theme's article supplies panel, 4px border and hard shadow; the card only lays out. */
#projects .projects-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

#projects .projects-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 16px;
}
#projects .projects-num {
  padding: 0 8px;
  background: #FFCD75;
  color: #1A1C2C;
}
#projects .projects-lang { color: #FFCD75; }

#projects .projects-name {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}

/* Descriptions are body copy: sans, never bitmap. */
#projects .projects-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 24px;
}

#projects .projects-links {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Dark-on-yellow rather than the theme's red link, which falls short of 4.5:1 on the panel. */
#projects .projects-links a {
  display: inline-block;
  min-height: 48px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  background: #FFCD75;
  border: 4px solid #FFCD75;
  color: #1A1C2C;
  box-shadow: 4px 4px 0 #29366F;
}
/* Press into the shadow: one pixel down and right, stepped by the theme's transition. */
#projects .projects-links a:hover,
#projects .projects-links a:active { transform: translate(4px, 4px); }
#projects .projects-links a:focus-visible { outline: 4px solid #F4F4F4; outline-offset: 4px; }

/* Project name for screen readers, so repeated "GitHub" links stay distinguishable. */
#projects .projects-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 720px) {
  #projects .projects-list { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  #projects .projects-card { padding: 16px; }
}
