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

/* === Colors === */
:root {
  --brand-red: #ff3b3b;
  --brand-dark: #cc2b2b;
  --bg-color: #121212;
  --text-color: #ffffff;
  --secondary-text: #b9b9b9;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-color: #fafafa;
    --text-color: #111111;
    --secondary-text: #333333;
  }
}

/* === Body === */
html,
body {
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Fira Code", monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: background 0.3s ease, color 0.3s ease;
  padding: 10px;
  overflow-x: hidden;
}

/* === Fade-in Animation === */
.fade-in {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Layout === */
.container {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

/* === Typing animation - ĐÃ THAY ĐỔI HOÀN TOÀN === */
.typing-container {
  width: 100%;
  max-width: 800px; /* Chiều rộng gốc của ảnh SVG */
  aspect-ratio: 800 / 160; /* Tỷ lệ W/H, có thể cần chỉnh số 120 */
  margin: 40px auto;
}

.typing-img {
  display: block;
  width: 100%;
  height: 100%; /* Lấp đầy khung chứa đã có tỷ lệ chuẩn */
}

/* === Headings === */
h1,
h2,
h3 {
  margin: 10px 0;
  font-weight: 600;
}

h1 {
  font-size: 1.6rem;
}

/* === About Section === */
.about {
  margin: 8px 0 18px;
  font-size: 0.98rem;
  color: var(--secondary-text);
}

/* === Badges === */
.badges {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 10px;
}

.badges a img {
  height: 26px;
  border-radius: 8px;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.badges a img:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* === Connect Section === */
.connect-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px 0 22px;
}

.connect-row a img {
  height: 34px;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.connect-row a:hover img {
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* === Snake Animation === */
.snake-animation {
  max-width: 90%;
  margin: 20px auto 0;
  display: block;
}

/* === Responsive === */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  /* Sửa lại selector cho ảnh snake */
  .snake-animation {
    width: 90%;
  }

  /* Xóa selector cũ của .typing-img trong media query vì đã có .typing-container xử lý */
}
