/**
 * hero.css
 * ─────────────────────────────────────────────────────────────────────────────
 * Hero section styles: full-viewport landing area with animated background,
 * profile image, typing role animation, and CTA buttons.
 * ─────────────────────────────────────────────────────────────────────────────
 */

/* ── HERO SECTION ───────────────────────────────────────────────
   Full viewport height, centered content, with canvas background.
──────────────────────────────────────────────────────────────── */
.section-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--navbar-height) + var(--space-8));
  padding-bottom: var(--space-16);
  background: var(--color-bg-primary);
  /* Subtle radial gradient overlay */
  background-image: var(--gradient-hero-bg);
}

/* ── CANVAS BACKGROUND ──────────────────────────────────────────
   Particle/geometric animation canvas drawn by hero-canvas.js (in app.js).
──────────────────────────────────────────────────────────────── */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

/* ── HERO CONTAINER ─────────────────────────────────────────────
   Two-column layout: text left, image right.
──────────────────────────────────────────────────────────────── */
.hero-container {
  position: relative;
  z-index: var(--z-raised);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

/* ── HERO CONTENT (left column) ─────────────────────────────────
──────────────────────────────────────────────────────────────── */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Greeting line: "Hi, I'm" */
.hero-greeting {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  letter-spacing: var(--tracking-wide);
  margin: 0;
}

/* Large name heading */
.hero-name {
  font-size: clamp(var(--text-5xl), 7vw, var(--text-7xl));
  font-weight: var(--weight-black);
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  /* Gradient on the name */
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Typing role animation wrapper */
.hero-roles-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  min-height: 2em;
}

.hero-role-prefix {
  color: var(--color-text-secondary);
  white-space: nowrap;
}

/* The typed text — changes via JS */
.hero-role-text {
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold);
}

/* Blinking cursor */
.hero-cursor {
  color: var(--color-accent);
  font-weight: var(--weight-light);
  animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Tagline paragraph */
.hero-tagline {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 520px;
  margin: 0;
}

/* CTA button group */
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

/* Social links row */
.hero-social-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* ── HERO IMAGE (right column) ──────────────────────────────────
──────────────────────────────────────────────────────────────── */
.hero-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-frame {
  position: relative;
  width: clamp(240px, 35vw, 380px);
  height: clamp(240px, 35vw, 380px);
}

/* Profile image */
.hero-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--color-accent-border);
  position: relative;
  z-index: 2;
  transition: transform var(--transition-slow);
}

.hero-image-frame:hover .hero-profile-img {
  transform: scale(1.02);
}

/* Decorative glow ring behind the image */
.hero-image-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: var(--gradient-accent);
  opacity: 0.15;
  filter: blur(20px);
  z-index: 1;
  animation: glow-pulse 3s ease-in-out infinite;
}

/* Decorative rotating border ring */
.hero-image-frame::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--color-accent) 0%,
    transparent 30%,
    var(--color-accent-2) 60%,
    transparent 80%,
    var(--color-accent) 100%
  );
  z-index: 0;
  animation: ring-rotate 8s linear infinite;
}

/* Mask to create ring effect */
.hero-image-frame::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--color-bg-primary);
  z-index: 1;
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.25;
    transform: scale(1.05);
  }
}

@keyframes ring-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
