/* ProfileWeb landing. Loaded only by the homepage. */
.profile-fusion .system-canvas {
  display: block;
  min-height: 0;
  padding: clamp(1.5rem, 4.4vw, 4.25rem);
  background:
    radial-gradient(ellipse at 100% 0%, #087b8826, transparent 55%),
    #182830;
}

.profile-fusion .canvas-copy {
  display: grid;
  grid-template-columns: 1.15fr minmax(0, 0.85fr);
  align-items: end;
  gap: 1.25rem clamp(2rem, 6vw, 6rem);
}

.profile-fusion .canvas-copy h3 {
  max-width: 19ch;
  margin-top: 0.65rem;
  font-size: clamp(1.95rem, 3.8vw, 3.65rem);
  line-height: 1.04;
}

.profile-fusion .canvas-copy > p,
.profile-fusion .system-stage p {
  color: var(--on-dark-muted);
  line-height: 1.55;
}

.profile-fusion .canvas-copy > p {
  max-width: 39ch;
  margin: 0;
}

.profile-fusion .system-example {
  margin-top: clamp(1.5rem, 4vw, 3.25rem);
  padding-top: 1.2rem;
  border-top: 1px solid #cfeaf333;
}

.profile-fusion .system-example > .poster-label {
  margin: 0 0 1.1rem;
  color: #8fe1e1;
}

.profile-fusion .system-flow {
  position: relative;
  padding-top: 1.8rem;
}

.profile-fusion .system-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-fusion .system-stage {
  position: relative;
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.45rem);
  border: 1px solid #cfeaf333;
  border-radius: 0.75rem;
  background: #0c1f29b3;
}

.profile-fusion .system-stage:last-child {
  border-color: #5dd3d399;
  background: #0d343e;
}

.profile-fusion .system-stage strong {
  display: block;
  font-family: var(--heading);
  font-size: 1.16rem;
  line-height: 1.2;
}

.profile-fusion .system-stage p {
  margin: 0.55rem 0 0;
  font-size: 1rem;
}

.profile-fusion .system-track {
  position: absolute;
  inset: 5px 1.25rem auto;
  inset-inline-end: calc((100% - 1.6rem) / 3 - 1.25rem);
  height: 1px;
  background: linear-gradient(90deg, #7aa4b177, #54ccd9);
  pointer-events: none;
}

.profile-fusion .system-stage::before {
  position: absolute;
  top: calc(-1.8rem - 1px);
  left: 1.25rem;
  width: 11px;
  height: 11px;
  border: 2px solid #8fc9d1;
  border-radius: 50%;
  background: #182830;
  content: "";
}

.profile-fusion .system-stage:last-child::before {
  border-color: #73e7e7;
  background: #73e7e7;
}

.profile-fusion .system-track .system-signal {
  --system-pulse-size: 10px;
  top: calc((1px - var(--system-pulse-size)) / 2);
  left: 0;
  width: var(--system-pulse-size);
  height: var(--system-pulse-size);
  background: #c0ffff;
  box-shadow: 0 0 0 4px #5dd3d34d, 0 0 14px #5dd3d3cc;
}

.profile-fusion .system-canvas.is-visible .system-signal {
  animation: none;
}

@keyframes profile-system-signal {
  0% { inset-inline-start: 0; opacity: 0; }
  12%, 88% { opacity: 1; }
  100% { inset-inline-start: 100%; opacity: 0; }
}

@keyframes profile-system-signal-vertical {
  0% { top: 0; opacity: 0; }
  12%, 88% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes profile-system-point {
  0%, 100% { box-shadow: 0 0 0 0 transparent, inset 0 0 0 0 transparent; }
  25% { box-shadow: 0 0 0 4px var(--system-point-halo, #8cebe340), inset 0 0 0 5px #a6fff478; }
}

/* Both halos reach peak brightness in 90ms. Mobile gets a longer fade. */
@keyframes profile-system-point-mobile {
  0%, 100% { box-shadow: 0 0 0 0 transparent, inset 0 0 0 0 transparent; }
  20% { box-shadow: 0 0 0 4px var(--system-point-halo, #8cebe340), inset 0 0 0 5px #a6fff478; }
}

@media (prefers-reduced-motion: no-preference) {
  html[data-landing-motion="ready"] .profile-fusion .system-canvas.is-visible .system-signal {
    animation: profile-system-signal 1100ms 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .profile-fusion .system-stage.is-signaling::before {
    animation: profile-system-point 360ms ease-out;
  }
}

@media (max-width: 760px) {
  .profile-fusion .canvas-copy,
  .profile-fusion .system-stages { grid-template-columns: minmax(0, 1fr); }

  .profile-fusion .system-flow { padding: 0 0 0 1.5rem; }

  .profile-fusion .system-track {
    inset: 1.3rem auto 1.3rem 5px;
    width: 1px;
    height: auto;
    background: linear-gradient(#7aa4b177, #54ccd9);
  }

  .profile-fusion .system-stage::before {
    --system-point-halo: #8cebe362;
    top: 1rem;
    left: calc(-1.5rem - 1px);
  }

  .profile-fusion .system-track .system-signal {
    --system-pulse-size: 12px;
    left: calc((1px - var(--system-pulse-size)) / 2);
    box-shadow: 0 0 0 5px #5dd3d359, 0 0 16px #5dd3d3e6;
  }

  @media (prefers-reduced-motion: no-preference) {
    html[data-landing-motion="ready"] .profile-fusion .system-canvas.is-visible .system-signal {
      animation-name: profile-system-signal-vertical;
      animation-duration: 1400ms;
    }

    .profile-fusion .system-stage.is-signaling::before {
      animation-name: profile-system-point-mobile;
      animation-duration: 450ms;
    }
  }
}

.profile-fusion .site-nav a[href="https://odoo.danielcortazar.com/"] {
  padding: 0.35rem 0.7rem;
  border: 1px solid currentColor;
  border-radius: 6px;
  color: var(--accent-text);
}

.profile-fusion .hero-poster {
  background:
    radial-gradient(ellipse at 78% 42%, #30475e 0, transparent 48%),
    var(--brand-charcoal);
}

.profile-fusion .hero-poster::before {
  left: 77%;
  width: min(58vw, 800px);
}

.profile-fusion .poster-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
  grid-template-areas:
    "intro intro"
    "name portrait"
    "role portrait"
    "promise promise";
  align-content: center;
  align-items: end;
  gap: clamp(1.15rem, 2.5vw, 2.5rem) clamp(2rem, 5vw, 6rem);
  min-height: 0;
  padding-block: 1.35rem 0;
}

.profile-fusion .poster-topline,
.profile-fusion .hero-name,
.profile-fusion .portrait-stage,
.profile-fusion .hero-role,
.profile-fusion .hero-promise {
  position: relative;
  inset: auto;
  width: auto;
  min-width: 0;
  margin: 0;
}

.profile-fusion .poster-topline { grid-area: intro; }

.profile-fusion .hero-name {
  grid-area: name;
  margin-top: clamp(1rem, 3vw, 3rem);
  font-size: clamp(4.4rem, 8.7vw, 9rem);
  line-height: 0.84;
  letter-spacing: -0.075em;
}

.profile-fusion .name-line:last-child {
  text-align: left;
}

.profile-fusion .portrait-stage {
  grid-area: portrait;
  align-self: end;
  width: min(100%, 540px);
  justify-self: center;
  transform: none;
}

.profile-fusion .portrait-cutout {
  display: grid;
  align-items: end;
  min-height: 0;
  overflow: visible;
  margin: 0;
  isolation: isolate;
  border-radius: 0 0 18px 18px;
  background: none;
  box-shadow: none;
}

/* The arch sits behind the cutout, below the top of the head. */
.profile-fusion .portrait-cutout::before {
  content: "";
  position: absolute;
  inset: 22% 5% 0;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 50% 50% 18px 18px / 42% 42% 18px 18px;
  background: linear-gradient(150deg, var(--accent), var(--brand-petrol) 61%, #141d26);
  box-shadow: var(--shadow);
}

.profile-fusion .portrait-cutout::after {
  height: 22%;
  border-radius: 0 0 18px 18px;
  pointer-events: none;
}

.profile-fusion .portrait-cutout picture,
.profile-fusion .portrait-cutout img {
  display: block;
  width: 100%;
}

.profile-fusion .portrait-cutout img {
  height: auto;
  min-height: 0;
  border-radius: 0 0 18px 18px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px #10182065);
}

.profile-fusion .hero-role {
  grid-area: role;
  align-self: start;
}

.profile-fusion .hero-role h2 {
  max-width: 16ch;
  font-size: clamp(2rem, 3.6vw, 3.7rem);
}

.profile-fusion .hero-role h2 + p {
  max-width: 45ch;
}

.profile-fusion .hero-promise {
  grid-area: promise;
  justify-self: center;
  padding: 1rem clamp(1rem, 3vw, 2.2rem);
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #151d26;
  text-align: center;
}

.profile-fusion .hero-promise > span { display: none; }

.profile-fusion .hero-promise p {
  max-width: none;
  color: var(--on-dark-muted);
  font-family: var(--mono);
  font-size: clamp(0.8rem, 1.4vw, 0.95rem);
  line-height: 1.5;
}

.profile-fusion .availability-stamp {
  top: clamp(4.6rem, 7vw, 7rem);
  right: 0;
  width: clamp(90px, 10vw, 122px);
  height: clamp(90px, 10vw, 122px);
  border-width: 3px;
}

.profile-fusion .challenge-grid > article {
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 95%, var(--accent));
}

.profile-fusion .experience-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  column-gap: clamp(1.8rem, 5.5vw, 5.5rem);
  row-gap: clamp(2rem, 5vw, 4.5rem);
}

.profile-fusion .experience-heading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.2rem clamp(1.8rem, 5.5vw, 5.5rem);
}

.profile-fusion .experience-heading h2 {
  max-width: 16ch;
  margin-top: 0.75rem;
}

.profile-fusion .experience-heading > p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.6;
}

.profile-fusion .career-path {
  margin: 0 0 0 0.5rem;
  padding-left: clamp(1.2rem, 2.4vw, 2rem);
  border-top: 0;
  border-left: 1px solid var(--line-strong);
}

.profile-fusion .career-path article {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0 0 1.45rem;
  border: 0;
}

.profile-fusion .career-path article + article {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.profile-fusion .career-path article::before {
  position: absolute;
  top: 0.25rem;
  left: calc(-1 * clamp(1.2rem, 2.4vw, 2rem) - 5px);
  width: 9px;
  height: 9px;
  border: 1px solid var(--accent-text);
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.profile-fusion .career-path article + article::before { top: 1.5rem; }
.profile-fusion .career-path .career-current::before { background: var(--accent-text); }

.profile-fusion .career-period { margin: 0 0 0.5rem; }

.profile-fusion .career-details p {
  max-width: 57ch;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: normal;
  text-transform: none;
}

.profile-fusion .since-panel {
  position: relative;
  top: auto;
  display: block;
  padding: clamp(1.4rem, 2.8vw, 2.5rem);
  background: linear-gradient(155deg, #27475b, var(--brand-charcoal) 78%);
}

.profile-fusion .since-panel > p:not(.poster-label) {
  position: relative;
  z-index: 1;
  margin-top: 1.2rem;
  color: var(--on-dark-muted);
}

.profile-fusion .review-preview {
  position: relative;
  z-index: 1;
  margin: 1.5rem 0 0;
  padding: clamp(0.8rem, 2vw, 1.25rem);
  border: 1px solid #9cd5da55;
  border-radius: 0.85rem;
  background: #11242e;
}

.profile-fusion .review-preview figcaption {
  margin-bottom: 0.9rem;
  color: var(--on-dark);
  font-family: var(--heading);
  font-weight: 620;
  line-height: 1.25;
}

.profile-fusion .review-steps {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-fusion .review-step {
  display: grid;
  grid-template-columns: 3.8rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.65rem 0.55rem;
  border: 1px solid #9cd5da33;
  border-radius: 0.5rem;
  color: var(--on-dark-muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.profile-fusion .review-role {
  color: #9aeae8;
  font-weight: 650;
}

.profile-fusion .review-status {
  margin: 0.85rem 0 0;
  color: #ffdea0;
  font-size: 0.92rem;
  line-height: 1.3;
}

@keyframes profile-review-highlight {
  0%, 100% { background: transparent; }
  35% { background: #8cebe329; }
}

@media (prefers-reduced-motion: no-preference) {
  html[data-landing-motion="ready"] .profile-fusion .review-preview.is-visible .review-step {
    animation: profile-review-highlight 650ms 360ms ease-in-out both;
  }

  html[data-landing-motion="ready"] .profile-fusion .review-preview.is-visible .review-step + .review-step {
    animation-delay: 940ms;
  }
}

.profile-fusion .fusion-glyph {
  position: relative;
  display: inline;
}

.profile-fusion .fusion-letter { opacity: 0; }

.profile-fusion .fusion-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: max(2px, 0.065em);
  height: var(--wave-height);
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
}

/* Reserve the entire title before the first paint and while waiting for scroll. */
@media (prefers-reduced-motion: no-preference) {
  html[data-landing-motion="boot"] .profile-fusion :is(main h1, main h2, main h3, .challenge-word, .capability-title, .site-footer h2),
  html[data-landing-motion="ready"] .profile-fusion [data-voice-pending] {
    opacity: 0;
  }

  /* Mask only the ink. Boxes, portraits, icons and the accessibility tree
     stay in place while the observer and first keyframes are installed. */
  html[data-landing-motion="boot"] .profile-fusion,
  html[data-landing-motion="ready"] .profile-fusion [data-caption-pending] {
    -webkit-text-fill-color: transparent;
    text-shadow: none;
  }

  .profile-fusion { --caption-control-start: 0.86; }
  .profile-fusion small { --caption-control-start: 0.97; }

  html[data-landing-motion="boot"] .profile-fusion :is(a, button, summary, a small, summary small),
  html[data-landing-motion="ready"] .profile-fusion [data-caption-pending="control"] {
    -webkit-text-fill-color: color-mix(in srgb, currentColor calc(var(--caption-control-start) * 100%), transparent);
  }

  html[data-landing-motion="boot"] .profile-fusion :is(.skip-link, [aria-hidden="true"]),
  html[data-landing-motion="ready"] .profile-fusion [data-caption-pending] > :not([data-caption-pending]) {
    -webkit-text-fill-color: currentColor;
  }
}

/* The shared accordion still changes height. Its text owns the opening fade. */
html[data-landing-motion="ready"] .profile-fusion .capability-rows .is-animating > .detail-body {
  opacity: 1 !important;
  transform: none !important;
}

html:not(.js) .profile-fusion .theme-toggle { display: none; }

@media (max-width: 980px) {
  .profile-fusion .experience-grid,
  .profile-fusion .experience-heading { grid-template-columns: minmax(0, 1fr); }

  .profile-fusion .since-panel { max-width: 36rem; }
}

@media (max-width: 840px) {
  html:not(.js) .profile-fusion .site-header { position: relative; }
  html:not(.js) .profile-fusion .nav-toggle { display: none; }
  html:not(.js) .profile-fusion .site-nav {
    position: static;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
    visibility: visible;
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 780px) {
  .profile-fusion .poster-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "name" "role" "portrait" "promise";
    gap: 1.45rem;
  }

  .profile-fusion .hero-name {
    font-size: clamp(3rem, 12vw, 7.3rem);
  }

  .profile-fusion .hero-role h2 {
    font-size: clamp(1.8rem, 5.5vw, 3rem);
  }

  .profile-fusion .portrait-stage {
    width: min(90%, 390px);
  }

  .profile-fusion .availability-stamp {
    position: relative;
    inset: auto;
    grid-area: portrait;
    align-self: start;
    justify-self: end;
    transform: rotate(7deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-fusion .fusion-letter,
  .profile-fusion .fusion-caption { opacity: 1 !important; }
  .profile-fusion .fusion-wave { display: none; }
}
