/* =============================================
   HERO SECTION
   ============================================= */

/* ── Hero Section ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

/* Cursor-tracked spotlight (VengenceUI style) */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    450px circle at var(--spot-x, 50%) var(--spot-y, 40%),
    rgba(179, 58, 58, 0.10),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero.spotlight-on::after {
  opacity: 1;
}

/* Ambient Aurora Glow layer (Aceternity UI style) */
.hero-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.75;
  will-change: transform;
}

.aurora-blob-1 {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle at 40% 50%, rgba(179, 58, 58, 0.16) 0%, transparent 70%);
  top: -100px;
  right: 5%;
}

.aurora-blob-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(192, 138, 46, 0.12) 0%, transparent 68%);
  bottom: -60px;
  left: 2%;
}

.aurora-blob-3 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(179, 58, 58, 0.10) 0%, transparent 65%);
  top: 40%;
  left: 35%;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* The WebGL body replaces the 2D particle fallback */
.has-body3d .hero-canvas {
  display: none;
}

/* Empty hero space is a handle for spinning the 3D body */
.has-body3d .hero {
  cursor: grab;
}

.has-body3d .hero-text,
.has-body3d .hero-image-wrap {
  cursor: auto;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--sp-16) var(--sp-6);
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--sp-12);
  align-items: center;
}

/* ── VengenceUI Border Beam Badge with Antique-Gold & Temple-Red ── */
.hero-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(23, 25, 30, 0.85);
  border: 1px solid rgba(192, 138, 46, 0.25);
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: var(--sp-4);
  overflow: hidden;
}

.hero-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(179, 58, 58, 0.85),
    rgba(192, 138, 46, 0.95),
    transparent
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-beam-sweep 3.5s linear infinite;
  pointer-events: none;
}

.hero-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.hero-badge-text {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--chalk);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Hero Name (Fraunces Display, Carved Architectural Dignity) ── */
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6.5vw, var(--text-7xl));
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: #ECEFF5;
  margin-bottom: var(--sp-3);
  display: flex;
  flex-direction: column;
}

.hero-name-first {
  color: #ECEFF5;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.06);
}

.hero-name-last {
  background: linear-gradient(135deg, #F4D38C 0%, #C08A2E 40%, #B33A3A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 2px 14px rgba(179, 58, 58, 0.3));
}

/* ── Role Pill ── */
.hero-role-pill {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gold);
  margin-bottom: var(--sp-4);
}

.hero-statement {
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--ash);
  line-height: 1.55;
  max-width: 44ch;
  margin-bottom: var(--sp-8);
}

.hero-statement strong {
  color: var(--chalk);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.hero-socials {
  display: flex;
  gap: var(--sp-5);
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--ash);
  transition: color 0.2s ease, transform 0.2s var(--ease-out);
}

.social-link:hover {
  color: var(--gold);
  transform: translateY(-2px);
}

.social-link svg {
  width: 16px;
  height: 16px;
}

/* Hero image & morphing photo */
.hero-image-wrap {
  position: relative;
  animation: hero-fade-in 0.5s var(--ease-out) 0.15s both;
}

/* Temple-doorway (torana) frame traced around the arched portrait */
.hero-image-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border: 1px solid var(--gold-30);
  /* 384×504 box: 192px top radius ≈ 38.1% of the height */
  border-radius: 50% 50% 18px 18px / 38.1% 38.1% 18px 18px;
  pointer-events: none;
  transition: opacity 0.3s ease, border-color 0.4s ease;
}

/* Gajur finial at the apex of the arch */
.hero-image-wrap::after {
  content: '';
  position: absolute;
  top: -17px;
  left: 50%;
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 14px rgba(192, 138, 46, 0.75);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hero-image-wrap:hover::before {
  border-color: rgba(192, 138, 46, 0.6);
}

.hero-image-wrap.is-docking::before,
.hero-image-wrap.is-docking::after {
  opacity: 0;
}

.hero-photo {
  width: 100%;
  height: auto; /* let aspect-ratio win over the <img height> attribute */
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
  /* Semicircular arch top (180px on a 360×480 photo = 37.5% of height) */
  border-radius: 50% 50% var(--r-xl) var(--r-xl) / 37.5% 37.5% var(--r-xl) var(--r-xl);
  border: 1px solid var(--ash-15);
  display: block;
  transform-origin: center center;
  transition: transform 0.4s var(--ease-out), border-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-photo.is-flying {
  position: relative;
  z-index: 1100;
  pointer-events: none;
  will-change: transform, border-radius, filter, box-shadow;
  transition: none;
}

.hero-photo.is-docked {
  opacity: 0;
  visibility: hidden;
  box-shadow: none;
}

.hero-image-wrap.is-docking .hero-image-badge {
  /* the entrance animation's `both` fill would otherwise pin opacity at 1 */
  animation: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.hero-image-wrap.is-docking:hover .hero-photo {
  transform: none;
  border-color: var(--ash-15);
}

.hero-image-wrap:hover .hero-photo {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(192, 138, 46, 0.45);
  box-shadow: 0 20px 50px -10px rgba(179, 58, 58, 0.25), 0 0 0 1px rgba(192, 138, 46, 0.25);
}

/* Status chip badge on photo corner */
.hero-image-badge {
  position: absolute;
  bottom: -12px;
  left: -12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(23, 25, 30, 0.92);
  border: 1px solid rgba(192, 138, 46, 0.3);
  border-radius: var(--r-lg);
  padding: 8px 12px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--chalk);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  animation: hero-fade-in 0.4s var(--ease-out) 0.3s both;
}

.hero-image-badge svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
  flex-shrink: 0;
}

/* ── 3D body hint (bottom of hero, only when WebGL is running) ── */
.hero-hint {
  position: absolute;
  left: 50%;
  bottom: var(--sp-6);
  z-index: 2;
  display: none;
  align-items: center;
  gap: var(--sp-3);
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
  pointer-events: none;
  animation: hero-fade-in 0.6s var(--ease-out) 1.1s both;
}

.has-body3d .hero-hint {
  display: flex;
}

.hero-hint i {
  font-style: normal;
  color: var(--gold);
  padding: 0 4px;
}

.hint-mouse {
  position: relative;
  width: 16px;
  height: 24px;
  border: 1px solid var(--ash-20);
  border-radius: 8px;
  flex-shrink: 0;
}

.hint-wheel {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 2px;
  height: 5px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--gold);
  animation: hint-wheel 1.8s var(--ease-out) infinite;
}

@keyframes hint-wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(7px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

.hint-touch {
  display: none;
}

@media (hover: none) {
  .hint-pointer { display: none; }
  .hint-touch { display: inline; }
}

/* Reduced motion renders a still sculpture, so there is nothing to play with */
@media (prefers-reduced-motion: reduce) {
  .has-body3d .hero-hint {
    display: none;
  }

  .has-body3d .hero {
    cursor: auto;
  }
}
