.hero {
  position: relative;
  height: 320px;
  background: url('../assets/image.png') no-repeat center 45%/70% auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  user-select: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Mobile  */
@media screen and (max-width: 768px) {
  .hero {
    height: auto; /* Let content define height */
    min-height: 380px;
    background-size: cover;
    background-position: center 40%;
    flex-direction: column; /* Stack content */
    padding: 1.5rem 1rem;
    overflow-x: hidden;
  }
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 24, 51, 0.65);
  z-index: 0;
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: 0 15px;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 18px;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.7);
}

.trait-grid {
  margin: 50px auto;
  max-width: 750px;
  display: flex;
  justify-content: space-around;
  gap: 20px;
  flex-wrap: wrap; /* Wrap for small screens */
}

.trait-box {
  background-color: var(--primary-dark);
  border: 2px solid var(--accent-color);
  width: 60px;
  height: 60px;
  border-radius: 12px;
  color: var(--accent-color);
  font-weight: 900;
  font-size: 2.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.trait-box:hover,
.trait-box:focus {
  background-color: var(--accent-color);
  color: var(--primary-dark);
  outline: none;
}

.trait-hover-info {
  display: none;
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 190px;
  background-color: var(--primary-dark);
  border: 1.5px solid var(--accent-color);
  border-radius: 12px;
  padding: 12px 15px;
  box-shadow: 0 4px 14px rgba(74, 144, 226, 0.7);
  color: var(--text-light);
  font-weight: 400;
  font-size: 0.9rem;
  text-align: center;
  z-index: 20;
  user-select: none;
}

.trait-box:hover .trait-hover-info,
.trait-box:focus .trait-hover-info {
  display: block;
}

.about {
  margin: 70px auto 60px;
  max-width: 650px;
  padding: 25px 35px;
  background-color: var(--primary-dark);
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(74, 144, 226, 0.6);
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.5;
}

.about h2 {
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--accent-color);
  font-size: 2.2rem;
  user-select: none;
}

.about p {
  margin-bottom: 14px;
  font-weight: 400;
  user-select: text;
}

.stats-section {
  padding: 2.5rem 1rem;
  text-align: center;
  background-color: var(--primary-dark);
  position: relative;
}

.stats-section h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--accent-color);
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.stat-box {
  background: rgba(0, 24, 51, 0.7);
  padding: 1.5rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(74, 144, 226, 0.3);
  transition: all 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-3px);
  border-color: rgba(74, 144, 226, 0.6);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

@media screen and (max-width: 768px) {
  .stats-section {
    padding: 2rem 0.5rem;
  }
  
  .stats-section h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0 0.5rem;
  }
  
  .stat-box {
    padding: 1.2rem 0.3rem;
  }
  
  .stat-number {
    font-size: 1.7rem;
  }
  
  .stat-label {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
  }

  /* Add this to index.css */
  .trait-grid {
    gap: 10px;
    padding: 0 10px;
  }
  
  .trait-box {
    width: 50px;
    height: 50px;
    font-size: 2.2rem;
  }
  
  .trait-hover-info {
    width: 160px;
    font-size: 0.8rem;
    padding: 10px 12px;
  }
}

@media screen and (max-width: 360px) {
  .trait-box {
    width: 45px;
    height: 45px;
    font-size: 2rem;
  }
}
