/* Hero (About section) */

/* 1) Entrance choreography: shell fades up, inner items stagger */
@keyframes hero-shell-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.hero-shell {
  animation: hero-shell-in 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-copy > *,
.portrait-panel {
  animation: hero-item-in 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-copy > *:nth-child(1) {
  animation-delay: 140ms;
}

.hero-copy > *:nth-child(2) {
  animation-delay: 220ms;
}

.hero-copy > *:nth-child(3) {
  animation-delay: 300ms;
}

.hero-copy > *:nth-child(4) {
  animation-delay: 380ms;
}

.portrait-panel {
  animation-delay: 260ms;
}

/* 3) Pointer parallax: portrait drifts against the cursor, copy with it */
.hero-shell {
  --parallax-x: 0;
  --parallax-y: 0;
}

.portrait-panel {
  translate: calc(var(--parallax-x) * -12px) calc(var(--parallax-y) * -10px);
  transition: translate 480ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  perspective: 900px;
}

/* Levitation: gentle bob synced with a breathing ground shadow */
@keyframes portrait-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -9px;
  }
}

@keyframes portrait-shadow {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.75;
  }
  50% {
    transform: scaleX(0.85);
    opacity: 0.45;
  }
}

.portrait-panel::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 62%;
  height: 18px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(24, 29, 35, 0.22), rgba(24, 29, 35, 0) 70%);
  pointer-events: none;
  animation: portrait-shadow 5.2s ease-in-out 1.1s infinite;
}

.hero-copy {
  translate: calc(var(--parallax-x) * 6px) calc(var(--parallax-y) * 5px);
  transition: translate 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero {
  padding-top: 44px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 390px);
  gap: clamp(28px, 5vw, 84px);
  align-items: center;
  padding: clamp(22px, 2.2vw, 30px) clamp(26px, 3.2vw, 44px);
  border-radius: 42px;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.2) 34%, rgba(255, 255, 255, 0.1)),
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 36%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 0.5px 0 rgba(255, 255, 255, 0.95) inset,
    0 -1px 0 rgba(255, 255, 255, 0.08) inset,
    0 30px 80px rgba(24, 29, 35, 0.12);
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 32%);
  opacity: 0.7;
}

.hero-copy {
  order: 1;
  display: grid;
  align-content: center;
  gap: 0;
  max-width: 640px;
}

.hero-copy h1,
.section-heading h2,
.timeline-item h3 {
  margin: 0;
}

.hero-copy h1,
.section-heading h2 {
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  margin-top: 14px;
  max-width: 10ch;
  font-size: var(--fs-display);
  line-height: 1;
  color: var(--text-1);
  text-wrap: balance;
}

.eyebrow,
.meta-label {
  margin: 0;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-label);
  font-weight: 700;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: clamp(30px, 4vw, 52px);
  row-gap: 16px;
  margin-top: 30px;
}

.hero-meta-item {
  display: grid;
  gap: 7px;
  align-content: start;
}

.hero-meta-advisors {
  flex-basis: 100%;
}

.hero-meta-item span:last-child {
  color: var(--text-1);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.02em;
}

#hero-affiliation,
#hero-advisors a {
  font-weight: 600;
  text-decoration: underline dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

#hero-affiliation:hover,
#hero-affiliation:focus-visible,
#hero-advisors a:hover,
#hero-advisors a:focus-visible {
  text-decoration-thickness: 2px;
}

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

.portrait-panel {
  --motion-scale: 0.55;
  --tilt-scale: 0.4;
  order: 2;
  width: min(100%, 330px);
  max-width: 330px;
  justify-self: end;
}

.portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 28px;
  transform: rotateX(var(--portrait-rx, 0deg)) rotateY(var(--portrait-ry, 0deg))
    scale(var(--portrait-scale, 1));
  transform-style: preserve-3d;
  transition: transform 360ms ease-out;
  filter: drop-shadow(0 20px 28px rgba(24, 29, 35, 0.16));
  animation: portrait-float 5.2s ease-in-out 1.1s infinite;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 6%, #000 94%, transparent),
    linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 6%, #000 94%, transparent),
    linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
  mask-composite: intersect;
}

.portrait-image {
  /* Keep more surroundings with a 1000px square starting at (40, 200). */
  position: absolute;
  left: -4%;
  top: -20%;
  width: 120%;
  max-width: none;
  height: 120%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.02) contrast(1.02);
}

/* Holo-card layer: rainbow sheen shifts with the cursor */
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms ease;
  z-index: 3;
  background: repeating-linear-gradient(
    115deg,
    hsla(0, 85%, 68%, 0.22) 0%,
    hsla(55, 85%, 68%, 0.22) 10%,
    hsla(120, 85%, 68%, 0.22) 20%,
    hsla(180, 85%, 68%, 0.22) 30%,
    hsla(240, 85%, 68%, 0.22) 40%,
    hsla(300, 85%, 68%, 0.22) 50%,
    hsla(360, 85%, 68%, 0.22) 60%
  );
  background-size: 260% 260%;
  background-position: calc(var(--glare-x, 50) * 1%) calc(var(--glare-y, 50) * 1%);
  mix-blend-mode: overlay;
}

.portrait-panel:hover .portrait-frame {
  --portrait-scale: 1.04;
}

.portrait-panel:hover .portrait-frame::after {
  opacity: 1;
}
