:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb;
}

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

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  flex-direction: column;
  gap: 24px;
}

.content {
  width: 100%;
  max-width: 720px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 18px;
  border: 2px solid var(--border);
}

h1 {
  font-size: clamp(1.9rem, 2.5vw, 2.6rem);
  margin-bottom: 12px;
}

p {
  color: var(--muted);
  margin-bottom: 24px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.links a:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1e3a8a;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.links a:active,
.button:active {
  transform: scale(0.98);
  box-shadow: none;
}

.links a::after,
.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.2);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.links a:active::after,
.button:active::after {
  opacity: 1;
  transform: scale(1);
}

@keyframes clickPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.links a:active {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #1e3a8a;
  animation: clickPulse 0.45s ease;
}

.button:active {
  background: #1e40af;
  animation: clickPulse 0.45s ease;
}

.github-activity {
  width: 100%;
  max-width: 1200px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
  animation-delay: 0.12s;
  overflow: hidden;
}

.github-activity h2 {
  font-size: 1.2rem;
  margin: 0;
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.activity-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.activity-controls select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.github-activity img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.chart-error {
  margin-top: 12px;
  color: #b91c1c;
  font-size: 0.95rem;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mobileLift {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 24px 8px;
  }

  .content,
  .github-activity {
    animation: mobileLift 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  .github-activity {
    animation-delay: 0.18s;
    padding: 20px 8px;
    border-radius: 12px;
  }

  .activity-header {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content,
  .github-activity {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
