:root {
  --bg: #0b0d12;
  --surface: #14171f;
  --border: #262b36;
  --text: #e7e9ee;
  --text-dim: #9aa1b0;
  --accent: #8b5cf6; /* arcade violet — site chrome, not tied to any one game */
  --accent-2: #22d3ee; /* cyan, used sparingly for the hover glow gradient */
  --accent-soft: rgba(139, 92, 246, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Same keyboard-focus affordance as the portfolio's own :focus-visible
   rule — a mouse click doesn't need a ring, tabbing through the cards
   does. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

header {
  padding: 3rem 1.5rem 1.75rem;
  text-align: center;
}

.wordmark {
  margin: 0;
  font-weight: 700;
  font-size: 2.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wordmark .dot {
  color: var(--accent);
}

header p {
  color: var(--text-dim);
  margin-top: 0.6rem;
}

/* The header's own accent bar, same role as .info-card::before on the
   portfolio — a gradient here instead of a flat fill is the one place
   the second accent tone earns its keep. */
header::after {
  content: '';
  display: block;
  width: 96px;
  height: 3px;
  margin: 1.25rem auto 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.grid {
  display: grid;
  /* auto-fit, not auto-fill: with fewer games than columns (today, just
     one), auto-fill leaves phantom empty columns and the real card stays
     stuck at its minimum width instead of filling the row — same fix
     already in place on the portfolio's own .card-grid. */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.25rem 1.25rem;
  height: 100%;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Top accent rule, same pattern as .info-card::before on the portfolio —
   the cheapest way to make a plain bordered box read as "branded". */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

/* A card that's nothing but a game's own og-card image — no separate
   icon/title/description because the image already carries them (same
   pattern as the portfolio's Embergale entry in its Playground). */
.card--image-only {
  padding: 0;
}

.card-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 0.4em;
  font-size: 1.6rem;
  line-height: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.card h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.card h2::after {
  content: '→';
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.card--disabled {
  opacity: 0.6;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.card-link:hover .card,
.card-link:focus-visible .card {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--accent-soft);
}

.card-link:hover .card::before,
.card-link:focus-visible .card::before {
  opacity: 1;
}

.card-link:hover h2::after,
.card-link:focus-visible h2::after {
  opacity: 1;
  transform: translateX(0);
}

.badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 2rem 1.5rem;
}

footer a {
  color: var(--text-dim);
  transition: color 0.15s ease;
}

footer a:hover,
footer a:focus-visible {
  color: var(--accent);
}
