/* =============================================
   HERO SECTION
   ============================================= */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* 160px top gives solid breathing room below the pill header (pill is at top:28px, ~52px tall) */
  padding: 160px 0 90px;
}

/* left content */
.container-hero {
  width: 100%;
  padding-left: clamp(40px, 7vw, 100px);
  padding-right: 16px;
  position: relative;
  z-index: 5;
}
.hero-content { max-width: 560px; }

/* start invisible — entrance JS reveals each */
.hero-eyebrow,
.hero-name,
.hero-role,
.hero-desc,
.hero-btns,
.hero-stats {
  opacity: 0;
}
.hero-eyebrow { transform: translateY(22px); }
.hero-name    { transform: scale(0.9) translateY(26px); transform-origin: left center; }
.hero-role    { transform: translateY(18px); }
.hero-desc    { transform: translateY(16px); }
.hero-btns    { transform: translateY(14px); }
.hero-stats   { transform: translateY(12px); }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px; letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 22px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow-line {
  display: inline-block;
  width: 36px; height: 1px;
  background: linear-gradient(90deg, var(--c-accent), transparent);
}

.hero-name {
  font-size: clamp(50px, 6.5vw, 84px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -2.5px;
  color: var(--c-frost);
  margin-bottom: 8px;
}
.hero-name .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(179,207,229,0.42);
}

.hero-role {
  font-size: clamp(15px, 1.7vw, 19px);
  color: rgba(179,207,229,0.62);
  margin-bottom: 22px;
  min-height: 30px;
  font-weight: 400;
}
#typed-text   { color: var(--c-vivid); font-weight: 500; }
.cursor-blink {
  display: inline-block;
  width: 2px; height: 17px;
  background: var(--c-vivid);
  margin-left: 2px; vertical-align: middle;
  animation: blink .85s step-start infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  font-size: 14.5px; line-height: 1.85;
  color: rgba(179,207,229,0.58);
  margin-bottom: 36px; max-width: 450px;
}

.hero-btns {
  display: flex; gap: 14px;
  margin-bottom: 54px; flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px;
  background: var(--c-blue); color: #fff;
  border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.btn-primary:hover {
  background: var(--c-vivid);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(56,189,248,0.3);
}
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px;
  background: transparent; color: var(--c-steel);
  border: 1.5px solid rgba(91,163,208,0.35);
  border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: all .25s ease;
}
.btn-outline:hover {
  border-color: var(--c-vivid); color: var(--c-frost);
  transform: translateY(-3px);
  background: rgba(56,189,248,0.06);
}

.hero-stats { display: flex; gap: 44px; }
.stat-num {
  font-family: var(--mono);
  font-size: 30px; font-weight: 700;
  color: var(--c-frost); line-height: 1; margin-bottom: 5px;
}
.stat-label { font-size: 11px; color: rgba(179,207,229,0.48); letter-spacing: .5px; }

/* ── RIGHT: glass photo card ── */
.hero-visual-stage {
  position: absolute;
  right: 7%; top: 50%;
  transform: translateY(-50%) translateX(70px) scale(0.92);
  width: 420px; height: 480px;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
}
.stage-ring {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.stage-ring.r1 { inset: -44px; border: 1px solid rgba(91,163,208,0.07); animation: stageSpin 70s linear infinite; }
.stage-ring.r2 { inset:  12px; border: 1px dashed rgba(91,163,208,0.05); animation: stageSpin 100s linear infinite reverse; }
@keyframes stageSpin { to { transform: rotate(360deg); } }

.photo-glass-card {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 300px; height: 370px;
  border-radius: 26px;
  background: rgba(11,24,48,0.44);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(179,207,229,0.14);
  box-shadow:
    0 40px 85px rgba(0,0,0,0.58),
    0 0 0 1px rgba(91,163,208,0.06) inset,
    0 1px 0 rgba(255,255,255,0.07) inset;
  overflow: hidden;
  animation: cardFloat 7s ease-in-out infinite;
  pointer-events: auto;
}
@keyframes cardFloat {
  0%,100% { transform: translate(-50%,-50%); }
  50%      { transform: translate(-50%,calc(-50% - 14px)); }
}
.photo-glass-card::before,
.photo-glass-card::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border: 1.5px solid rgba(91,163,208,0.48);
  z-index: 2; pointer-events: none;
}
.photo-glass-card::before { top: 13px; left: 13px; border-right: none; border-bottom: none; border-radius: 5px 0 0 0; }
.photo-glass-card::after  { bottom: 13px; right: 13px; border-left: none; border-top: none; border-radius: 0 0 5px 0; }

.photo-glass-inner {
  position: absolute; inset: 13px;
  border-radius: 17px; overflow: hidden;
  background: rgba(6,12,24,0.45);
}
.hero-photo {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
}
.hero-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(91,163,208,0.11) 0%, transparent 65%),
    rgba(8,16,34,0.5);
  transition: background .3s ease;
}
.hero-photo-placeholder:hover {
  background:
    radial-gradient(circle at 50% 38%, rgba(91,163,208,0.19) 0%, transparent 65%),
    rgba(8,16,34,0.5);
}
.pulse-rings { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pulse-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(91,163,208,0.17);
  animation: ringPulse 3.5s ease-in-out infinite;
}
.pulse-ring:nth-child(1) { width: 80px;  height: 80px;  animation-delay: 0s; }
.pulse-ring:nth-child(2) { width: 132px; height: 132px; animation-delay: .6s; }
.pulse-ring:nth-child(3) { width: 184px; height: 184px; animation-delay: 1.2s; border-color: rgba(91,163,208,0.09); }
@keyframes ringPulse {
  0%,100% { transform: scale(1); opacity: .5; }
  50%      { transform: scale(1.05); opacity: 1; }
}
.upload-icon-wrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.upload-label { font-family: var(--mono); font-size: 9.5px; color: rgba(91,163,208,0.65); letter-spacing: 2.5px; text-transform: uppercase; }

.hero-visual-meta {
  position: absolute; bottom: -46px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px;
  color: rgba(179,207,229,0.48); letter-spacing: 1.5px;
  white-space: nowrap; pointer-events: none;
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 8px rgba(74,222,128,0.7);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .32; } }

.tech-badge {
  position: absolute;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(10,22,46,0.72);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(91,163,208,0.26);
  display: flex; align-items: center; justify-content: center;
  z-index: 5; pointer-events: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.42);
}
.tech-badge svg { width: 20px; height: 20px; }
.tech-badge.b1 { top: 18px;    left: -14px;  animation: badgeFloat 4s ease-in-out 0s   infinite; }
.tech-badge.b2 { top: 100px;   right: -16px; animation: badgeFloat 4s ease-in-out 1.1s infinite; }
.tech-badge.b3 { bottom: 110px;left: -16px;  animation: badgeFloat 4s ease-in-out 2.2s infinite; }
.tech-badge.b4 { bottom: 22px; right: -14px; animation: badgeFloat 4s ease-in-out 3.3s infinite; }
@keyframes badgeFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* scroll hint */
.scroll-indicator {
  position: absolute; bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 5; opacity: 0;
  transition: opacity .6s ease;
}
.scroll-mouse {
  width: 22px; height: 36px;
  border: 1.5px solid rgba(179,207,229,0.28);
  border-radius: 12px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-wheel {
  width: 3px; height: 7px;
  background: var(--c-accent); border-radius: 2px;
  animation: scrollWheel 1.8s ease-in-out infinite;
}
@keyframes scrollWheel {
  0%  { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(10px); opacity: 0; }
  100%{ transform: translateY(0); opacity: 0; }
}
.scroll-label {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 2.5px; color: rgba(179,207,229,0.38);
  text-transform: uppercase;
}

/* =========================
   HERO RESPONSIVE
   ========================= */

/* Small laptop — visual stage starts colliding with hero text
   before it reaches the existing 992px breakpoint (see calc above) */
@media (max-width: 1150px) {
  .hero-visual-stage { display: none; }
}

/* Tablet */
@media (max-width: 992px) {
  .container-hero { padding-left: 24px; padding-right: 24px; }
  .hero-content { max-width: 100%; }
  .hero-stats { gap: 28px; }
  #home { padding: 140px 0 80px; }
}

/* Mobile */
@media (max-width: 600px) {
  #home { min-height: 0; padding: 120px 0 24px; }
  .hero-btns { flex-direction: column; }
  .hero-btns a { justify-content: center; }
  .hero-stats { gap: 18px; }
}
/* Hero button accents */
#home .btn-primary { background: #326b98; }
#home .btn-primary:hover { background: #4389b9; box-shadow: 0 12px 28px rgba(50, 107, 152, .35); }
#home .btn-outline { border-color: rgba(91, 163, 208, .55); }
#home .btn-outline:hover { border-color: #5ba3d0; background: rgba(50, 107, 152, .18); }
/* Phrase colors drawn from the portfolio's existing accent palette. */
#typed-text { transition: color .25s ease; }
#typed-text[data-phrase="1"] { color: #a5aefb; }
#typed-text[data-phrase="2"] { color: #6ee7c7; }
#typed-text[data-phrase="3"] { color: #d6a5fa; }
@media (prefers-reduced-motion: reduce) { #typed-text { transition: none; } .cursor-blink { animation: none; } }
/* Gently cycle the hero role label through the site's accent colors. */
@media (prefers-reduced-motion: no-preference) {
  .hero-eyebrow { animation: hero-label-color 8s ease-in-out infinite; }
  @keyframes hero-label-color {
    0%, 100% { color: #7fc4ed; }
    33% { color: #a5aefb; }
    66% { color: #8fddd0; }
  }
}
/* Apply the hero label's color cycle to section labels. */
@media (prefers-reduced-motion: no-preference) {
  .about-eyebrow, .svc-eyebrow, .proj-eyebrow, .ct-eyebrow {
    animation: hero-label-color 8s ease-in-out infinite;
  }
}
/* Coordinate the hero calls to action with the animated section labels. */
@media (prefers-reduced-motion: no-preference) {
  #home .btn-primary { animation: hero-button-color 8s ease-in-out infinite; }
  #home .btn-outline { animation: hero-button-border 8s ease-in-out infinite; }
  @keyframes hero-button-color {
    0%, 100% { background-color: #326b98; box-shadow: 0 6px 20px rgba(50, 107, 152, .28), 0 0 12px rgba(91, 163, 208, .12); }
    33% { background-color: #555d9f; box-shadow: 0 6px 20px rgba(85, 93, 159, .3), 0 0 12px rgba(129, 140, 248, .14); }
    66% { background-color: #286f77; box-shadow: 0 6px 20px rgba(40, 111, 119, .3), 0 0 12px rgba(106, 196, 183, .13); }
  }
  @keyframes hero-button-border {
    0%, 100% { border-color: #5ba3d0; box-shadow: 0 0 14px rgba(91, 163, 208, .1); }
    33% { border-color: #818cf8; box-shadow: 0 0 14px rgba(129, 140, 248, .12); }
    66% { border-color: #6ac4b7; box-shadow: 0 0 14px rgba(106, 196, 183, .1); }
  }
  #home .btn-primary:hover, #home .btn-outline:hover { animation-play-state: paused; }
}
@media (prefers-reduced-motion: no-preference) {
  #services .svc-heading .grad, #projects .proj-title em {
    background: none;
    -webkit-text-fill-color: currentColor;
    animation: hero-label-color 8s ease-in-out infinite;
  }
}
/* Keep the animated hero buttons on desktop only. */
@media (max-width: 1024px) {
  #home .btn-primary, #home .btn-outline { animation: none; }
}
/* Complement the hero's existing staggered entrance with a gentle photo reveal. */
@media (prefers-reduced-motion: no-preference) {
  .hero-photo { animation: hero-photo-entrance 1.5s cubic-bezier(.22,1,.36,1) .9s both; }
  @keyframes hero-photo-entrance {
    from { opacity: 0; scale: .96; filter: blur(5px); }
    to { opacity: 1; scale: 1; filter: blur(0); }
  }
}
/* Distinct, restrained entrance directions for the hero elements. */
@media (prefers-reduced-motion: no-preference) {
  .hero-eyebrow { transform: translateX(-18px); }
  .hero-name { transform: translateY(22px) scale(.96); }
  .hero-role { transform: translateX(18px); }
  .hero-desc { transform: translateY(22px); }
  .hero-btns { transform: translateY(14px) scale(.98); transform-origin: left center; }
}
/* One-time entrance for section introductions; deck and gallery retain their own motion. */
@media (prefers-reduced-motion: no-preference) {
  #services :is(.svc-eyebrow, .svc-heading, .svc-subtext, .svc-tracker),
  #projects :is(.proj-eyebrow, .proj-title, .proj-subtitle, .proj-footer) {
    transition: opacity 1.2s cubic-bezier(.22,1,.36,1), translate 1.2s cubic-bezier(.22,1,.36,1), scale 1.2s cubic-bezier(.22,1,.36,1);
  }
  #services .section-reveal-pending, #projects .section-reveal-pending { opacity: 0; translate: 0 20px; }
  #services .svc-eyebrow.section-reveal-pending, #projects .proj-eyebrow.section-reveal-pending { translate: -14px 0; }
  #services .svc-heading.section-reveal-pending, #projects .proj-title.section-reveal-pending { scale: .97; }
  #services .svc-tracker.section-reveal-pending { translate: 16px 0; }
  #services .section-reveal-pending:focus-within, #projects .section-reveal-pending:focus-within { opacity: 1; translate: none; scale: 1; }
}
/* Keep the hero-to-About transition compact on tablets. */
@media (min-width: 601px) and (max-width: 1024px) {
  html #home { min-height: 0; padding-bottom: 0; }
  html #home .hero-btns { margin-bottom: 0; }
  html #about { padding-top: 96px; }
}
