/* ============================================================
   HERO SECTION STYLES
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
  background: var(--gradient-hero);
}

/* --- Background Glow Orbs --- */
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.hero__glow--1 {
  width: 600px; height: 600px;
  background: rgba(108, 99, 255, 0.15);
  top: -200px; right: -100px;
  animation: float 8s ease-in-out infinite;
}
.hero__glow--2 {
  width: 400px; height: 400px;
  background: rgba(139, 92, 246, 0.1);
  bottom: -100px; left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}
.hero__glow--3 {
  width: 300px; height: 300px;
  background: rgba(108, 99, 255, 0.08);
  top: 50%; left: 30%;
  animation: float 12s ease-in-out infinite;
}

/* --- Entrance animations --- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes techPop {
  from { opacity: 0; transform: translateY(16px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.hero__anim {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.hero__anim--1 { animation: heroFadeUp 0.7s 0.1s forwards; }
.hero__anim--2 { animation: heroFadeUp 0.7s 0.2s forwards; }
.hero__anim--3 { animation: heroFadeUp 0.7s 0.35s forwards; }
.hero__anim--4 { animation: heroFadeUp 0.7s 0.5s forwards; }
.hero__anim--5 { animation: heroFadeUp 0.7s 0.65s forwards; }

/* --- Layout --- */
.hero__container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

/* Badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  margin-bottom: 28px;
}
.hero__badge-dot {
  width: 8px; height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--color-primary);
}

/* Heading */
.hero__heading {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}
.hero__title-line     { color: var(--color-text-primary); }
.hero__title-outline  { color: transparent; -webkit-text-stroke: 2px var(--color-primary); }

/* Description */
.hero__description {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 36px;
}

/* Buttons */
.hero__buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.hero__btn-primary, .hero__btn-outline {
  font-size: 1rem;
  padding: 14px 32px;
}
.hero__btn-icon {
  transition: transform var(--transition-fast);
}
.hero__btn-primary:hover .hero__btn-icon {
  transform: translateX(4px);
}
.hero__download-icon {
  display: flex;
  align-items: center;
}

/* Tech Stack Row */
.hero__tech-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero__tech-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
}
.hero__tech-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Tech icon card với SVG logo thật */
.hero__tech-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  cursor: default;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  animation: techPop 0.5s both;
}
.hero__tech-icon:hover {
  border-color: var(--tech-color, var(--color-primary));
  background: var(--color-bg-elevated);
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.3);
}

/* SVG logo container */
.hero__tech-svg {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero__tech-svg svg {
  width: 100%;
  height: 100%;
}

.hero__tech-name {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* --- Right: Visual --- */
.hero__visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Avatar wrapper - hình chữ nhật bo góc thay vì tròn */
.hero__avatar-wrapper {
  position: relative;
  width: 320px;
  /* Tỉ lệ 3:4 để thấy ngực đến đầu */
  height: 420px;
}

.hero__avatar-ring {
  position: absolute;
  inset: -10px;
  border-radius: 40px;
  border: 1.5px dashed rgba(108, 99, 255, 0.35);
  animation: spin 25s linear infinite;
}

.hero__avatar-glow {
  position: absolute;
  inset: -40px;
  border-radius: 60px;
  background: radial-gradient(ellipse at center, rgba(108, 99, 255, 0.22) 0%, transparent 70%);
  filter: blur(24px);
}

/* Frame ảnh - clip để chỉ thấy từ ngực lên mặt */
.hero__avatar-frame {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  border: 2px solid rgba(108, 99, 255, 0.4);
  position: relative;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
  background: var(--color-bg-card);
  box-shadow: 0 20px 60px rgba(108, 99, 255, 0.25), 0 4px 20px rgba(0,0,0,0.5);
}

/* ảnh crop tập trung vào vùng ngực-mặt */
.hero__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Dịch chuyển lên để thấy mặt + ngực (ảnh thường chụp từ trên xuống) */
  object-position: center 15%;
  display: block;
}

/* Available badge */
.hero__available-badge {
  position: absolute;
  bottom: -14px;
  right: -14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-card);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  z-index: 2;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
  white-space: nowrap;
}
.hero__available-dot {
  width: 8px; height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px #10b981;
}

/* --- Code Card --- */
.hero__code-card {
  width: 100%;
  max-width: 360px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  animation: heroFadeIn 0.7s 0.5s both;
}
.hero__code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--color-border-subtle);
}
.hero__code-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.hero__code-dot--red    { background: #ff5f57; }
.hero__code-dot--yellow { background: #febc2e; }
.hero__code-dot--green  { background: #28c840; }
.hero__code-filename {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}
.hero__code-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: auto;
}
.hero__code-body code { font-family: inherit; }
.hero__code-keyword  { color: #c792ea; }
.hero__code-var      { color: #82aaff; }
.hero__code-prop     { color: #f78c6c; }
.hero__code-string   { color: #c3e88d; }
.hero__code-punct    { color: #89ddff; }

/* Scroll indicator */
.hero__scroll-indicator {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  animation: fadeIn 1s 1.2s both;
}
.hero__scroll-mouse {
  width: 26px; height: 42px;
  border: 2px solid rgba(108, 99, 255, 0.4);
  border-radius: 13px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
}
.hero__scroll-wheel {
  width: 4px; height: 8px;
  background: var(--color-primary);
  border-radius: 2px;
  animation: scrollWheel 1.5s ease-in-out infinite;
}
@keyframes scrollWheel {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}
.hero__scroll-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__content {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero__visual { order: 2; }
  .hero__description { text-align: center; }
  .hero__buttons, .hero__tech-row { justify-content: center; }
  .hero__avatar-wrapper { width: 260px; height: 340px; }
}

@media (max-width: 640px) {
  .hero { padding: 100px 0 60px; }
  .hero__heading { font-size: clamp(2.2rem, 9vw, 3rem); letter-spacing: -1px; }
  .hero__code-card { max-width: 300px; }
  .hero__avatar-wrapper { width: 220px; height: 290px; }
  .hero__tech-icon { padding: 8px 10px; }
  .hero__tech-svg { width: 26px; height: 26px; }
  .hero__tech-name { font-size: 0.58rem; }
}
