html {
  height: 100%;
}

body {
  background: linear-gradient(
    to bottom,
    white,
    yellow,
    orange,
    red,
    purple,
    black
  );
  background-attachment: fixed;
  min-height: 100%;
  margin: 0;
  padding: 20px;
  font-family: monospace;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
}

nav {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 5px;
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
}

nav a {
  margin-right: 20px;
  text-decoration: none;
  color: #000;
}

main {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 5px;
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
}

footer {
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: auto;
}

footer a {
  color: white;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
  color: blue;
}

/* ── Project cards (homepage) ─────────────────────────────────────────────── */

.project-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.project-card {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 16px 20px;
  flex: 1 1 260px;
  max-width: 380px;
}

.project-card:hover {
  border-color: #000;
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-family: monospace;
}

.project-card h3 a {
  text-decoration: none;
  color: #000;
}

/* stretch the project link to cover the whole card */
.project-card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.project-card p {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.5;
}

.project-card .post-link {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  color: #777;
  text-decoration: none;
}

.project-card .post-link:hover {
  color: #000;
  text-decoration: underline;
}
