/* hero.css — first screen (fits one screen): one-line name, yellow line + typing title, short intro, photo in a circle with 3 rings, badges and floating skill words */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 100px 0 40px;
  --band:
    radial-gradient(circle at 72% 45%, var(--yellow-a28), transparent 42%),
    linear-gradient(var(--grey-line) 1px, transparent 1px) 0 0 / 100% 140px,
    linear-gradient(90deg, var(--grey-line) 1px, transparent 1px) 0 0 / 140px 100%,
    linear-gradient(var(--white), var(--ivory));
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(transparent, var(--ivory));
  opacity: var(--band-opacity);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 64px;
}
/* Columns keep their 1.1 : 0.9 share even when the longest typed title is a few px wider (it may use the gap) */
.hero__grid > * { min-width: 0; }

/* The text column is a size container, so the name can shrink with the column (cqi = 1% of its width) */
.hero__text { container-type: inline-size; }

.hero__greeting {
  color: var(--yellow);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  animation: fadeUp 0.6s ease both;
}

/* Name on one line; 11.5cqi keeps it inside the column even when 4.6vw would be too big */
.hero__name {
  color: var(--heading);
  font-size: clamp(40px, min(4.6vw, 11.5cqi), 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  white-space: nowrap;
  animation: fadeUp 0.6s 0.1s ease both;
}

/* Typing title with a short yellow line in front of it (the line is ::before) */
.hero__role {
  display: flex;
  align-items: center;
  margin: 16px 0 12px;
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.15;
  min-height: 1.15em;
  white-space: nowrap;
  animation: fadeUp 0.6s 0.2s ease both;
}
.hero__role::before {
  content: '';
  flex-shrink: 0;
  width: 32px;
  height: 3px;
  margin-right: 14px;
  border-radius: 3px;
  background: var(--yellow);
}
.hero__role-title { font-weight: 800; letter-spacing: -0.5px; color: var(--yellow); }

.hero__cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 5px;
  vertical-align: -0.08em;
  background: var(--heading);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__intro {
  max-width: 460px;
  text-wrap: balance;   /* two even lines instead of one long line + one lonely word */
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  animation: fadeUp 0.6s 0.3s ease both;
}

.hero__ctas {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  animation: fadeUp 0.6s 0.4s ease both;
}
.hero__ctas .btn { flex-shrink: 0; white-space: nowrap; }

/* The photo group sits in the middle of the right column, vertically centered with the text.
   container-type lets the circle size itself to the column width (cqi = 1% of the column's width). */
.hero__visual {
  container-type: inline-size;
  display: flex;
  justify-content: center;
}

/* ~15% bigger than before (max 440px → 506px), but never wider than the column (+4%) or too tall for the screen */
.hero__orbit {
  position: relative;
  flex-shrink: 0;
  width: clamp(240px, min(104cqi, 100svh - 230px), 506px);
  aspect-ratio: 1;
}

/* ---------- Skill words floating around the photo ---------- */
.hero__words { list-style: none; position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.hero__word {
  position: absolute;
  font-size: var(--size, 12px);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--heading);
  opacity: var(--o, 0.35);
  rotate: var(--r, 0deg);
  animation: word-drift var(--d, 10s) ease-in-out var(--delay, 0s) infinite;
}

/* Scattered positions (% of the circle area); right-side words are anchored with "right" so they never run off-screen */
.hero__word--2 { top: 2%;   left: 56%;  --size: 12px; --o: 0.3;  --r: 5deg;  --d: 13s; --delay: -7s; }
.hero__word--3 { top: 33%;  right: -9%; --size: 11px; --o: 0.3;  --r: -7deg; --d: 9s;  --delay: -4s; }
.hero__word--4 { top: 31%;  left: -4%; --size: 12px; --o: 0.35; --r: -8deg; --d: 12s; --delay: -9s; }
.hero__word--6 { top: 95%;  left: -4%;  --size: 12px; --o: 0.3;  --r: 4deg;  --d: 14s; --delay: -11s; }
.hero__word--7 { top: 102%; left: 48%;  --size: 11px; --o: 0.25; --r: -5deg; --d: 10s; --delay: -6s; }

@keyframes word-drift {
  0%, 100% { translate: 0 0; }
  33%      { translate: 6px -8px; }
  66%      { translate: -5px 5px; }
}

.hero__ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero__ring--1 { inset: 13%; border: 1.5px solid var(--yellow-a50); }
.hero__ring--2 { inset: 6%; border: 1.5px dashed var(--yellow-a55); animation: spin 60s linear infinite; }
.hero__ring--3 { inset: 0; border: 1px solid var(--yellow-a20); }

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

.hero__photo {
  position: absolute;
  inset: 20%;
  z-index: 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(var(--yellow-soft), var(--honey));
  box-shadow: 0 0 60px var(--yellow-a30);
}

.hero__photo img {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 104%;
  max-width: none;
  transform: translateX(-50%);
}

.badge {
  position: absolute;
  z-index: 2;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 8px 20px var(--yellow-a25);
  animation: float 5s ease-in-out infinite;
}

.badge--ui {
  top: 19%;
  left: 19%;
  padding: 8px 12px;
  background: var(--yellow);
  color: var(--white);
  font-size: 18px;
  border: 3px solid var(--yellow-border);
}

.badge--ux {
  top: 72%;
  left: 88%;
  padding: 6px 14px;
  background: var(--lime-strong);
  color: var(--white);
  font-size: 18px;
  border: 3px solid var(--lime-border);
  animation-delay: -2s;
}

.badge--icon { width: 40px; height: 40px; }
.badge--icon svg { width: 20px; height: 20px; }
.badge--paint { top: 18%; left: 88%; background: var(--sky); color: var(--sky-ink); animation-delay: -1s; }
.badge--code  { top: 50%; left: 13%; background: var(--lilac); color: var(--lilac-ink); animation-delay: -3s; }
.badge--pen   { top: 85%; left: 15%; background: var(--rose); color: var(--rose-ink); animation-delay: -4s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@media (max-width: 900px) {
  .hero { padding-top: 110px; }
  .hero__grid { grid-template-columns: 1fr; gap: 72px; }
  .hero__orbit { width: min(460px, 90cqi); }
}

@media (max-width: 760px) {
  .hero__role { white-space: normal; min-height: 2.3em; }
  .hero__words { display: none; }   /* too crowded on phones */
}

/* Small phones: the name may break onto two lines and gets smaller */
@media (max-width: 599px) {
  .hero__name { white-space: normal; font-size: clamp(34px, 11vw, 44px); }
}

@media (max-width: 560px) {
  .hero__ctas { gap: 12px; }
  .hero__ctas .btn-primary { padding: 14px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__cursor { display: none; }
}
