/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 55%),
    radial-gradient(circle at 85% 75%, color-mix(in srgb, var(--cyan) 12%, transparent), transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 85%);
}

/* Signature element: animated system-architecture diagram (SVG), evoking
   the distributed / cloud-native systems this engineer actually builds,
   rather than generic floating particles. */
.hero-arch {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}
[data-theme="light"] .hero-arch { opacity: 0.4; }

.hero-arch svg { width: 100%; height: 100%; }

.arch-node {
  fill: var(--bg-elev-1);
  stroke: var(--border-strong);
  stroke-width: 1;
}

.arch-node-dot {
  fill: var(--primary);
}

.arch-line {
  stroke: url(#archGradient);
  stroke-width: 1.4;
  fill: none;
  stroke-dasharray: 6 8;
  animation: archFlow 3.5s linear infinite;
  opacity: 0.65;
}

.arch-pulse {
  fill: var(--cyan);
  opacity: 0;
  animation: archPulse 4s ease-in-out infinite;
}

@keyframes archFlow {
  to { stroke-dashoffset: -140; }
}

@keyframes archPulse {
  0% { opacity: 0; transform: scale(0.6); }
  15% { opacity: 1; transform: scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: scale(0.6); }
}

#heroCode {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-code {
  position: absolute;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--code-color);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  animation: codeFloat 22s linear infinite;
}

@keyframes codeFloat {
  0% { transform: translateY(6vh); opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translateY(-10vh); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

.hero-photo-wrap {
  position: relative;
  width: 232px;
  height: 232px;
}

.hero-photo-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--cyan), var(--primary-2), var(--primary));
  animation: ringSpin 8s linear infinite;
  filter: blur(0.3px);
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

.hero-photo {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elev-1);
  border: 4px solid var(--bg);
  z-index: 1;
}

.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-photo-badge {
  position: absolute;
  bottom: 6px; right: 6px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: 4px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  box-shadow: 0 6px 18px -4px rgba(37, 99, 235, 0.7);
}
.hero-photo-badge svg { width: 20px; height: 20px; color: #fff; }

.hero-text .eyebrow { margin-bottom: 18px; }

.hero-text h1 {
  font-size: clamp(2.4rem, 5.4vw, var(--fs-5xl));
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-text .hero-title {
  margin-top: 10px;
  font-size: clamp(1.1rem, 2vw, var(--fs-xl));
  font-weight: 600;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-summary {
  margin-top: 22px;
  max-width: 620px;
  color: var(--text-dim);
  font-size: var(--fs-lg);
  line-height: 1.7;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 900px) { .hero-actions { justify-content: center; } }

.hero-socials {
  margin-top: 28px;
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  transition: all var(--dur-fast) var(--ease-out);
}
.social-btn:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  transform: translateY(-3px);
}
.social-btn svg { width: 18px; height: 18px; }

.hero-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  z-index: 2;
}

.hero-scroll-cue .line {
  width: 1px; height: 34px;
  background: linear-gradient(var(--text-faint), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scroll-cue .line::after {
  content: '';
  position: absolute;
  top: -34px; left: 0;
  width: 100%; height: 34px;
  background: linear-gradient(var(--primary), transparent);
  animation: scrollCue 2s ease-in-out infinite;
}
@keyframes scrollCue {
  to { top: 34px; }
}
