/* Layout Container */

main {
  max-width: 1100px;
  margin: 80px auto;
  padding: 20px;
}

/* Header */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 50px;
}

.title {
  font-size: 1.8rem;
  font-weight: 600;
}

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

/* Theme Toggle */

.theme-toggle {
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

/* Card Grid */

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Card Style */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow, none);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}


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

.card:hover .card-desc {
  color: var(--accent-contrast);
}


.card-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Fade Animation */

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Footer */

footer {
  margin-top: 70px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Responsive spacing */

@media (max-width: 600px) {
  main {
    margin: 50px auto;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}
