*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-hover: #232735;
  --border: #2a2e3a;
  --text: #e4e4e7;
  --text-muted: #9ca3af;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  flex: 1;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.card:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

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

footer a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

footer a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  header {
    padding: 2rem 1rem 1.5rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .grid {
    grid-template-columns: 1fr;
    padding: 0 1rem 2rem;
  }
}
