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

html {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  background: #0a0a0f;
  color: #f0f0f0;
  min-height: 100%;
  position: relative;
  overflow-x: hidden;
}

/* Animated canvas background */
#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Subtle dot grid */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  z-index: 10;
  animation: fadeIn 1.2s ease both;
}

.back-link {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

main {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #f0f0f0 0%, #a0a0b0 50%, #f0f0f0 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeIn 1.2s ease both, shimmer 8s ease-in-out infinite;
}

.subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 3rem;
  animation: fadeIn 1.2s ease 0.15s both;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Card grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  animation: fadeIn 1.2s ease 0.3s both;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.1);
  transform: translateY(-4px);
}

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

.card h2 {
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.625rem;
  color: #f0f0f0;
}

.card p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  flex: 1;
}

.card-tag {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  align-self: flex-start;
}

/* Card action buttons */
.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.card-btn {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
  background: transparent;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.card-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

.card-btn.primary {
  color: rgba(165, 180, 255, 0.85);
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.08);
}

.card-btn.primary:hover {
  color: #fff;
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.18);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* Entrance animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 600px) {
  main {
    padding: 6rem 1.25rem 3rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
