[data-scramble],
[data-scramble-on-scroll] {
  position: relative;
}

/* Wrapper that locks layout to the final character's footprint */
.scramble-unit {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
}

/* Invisible copy of the final char — holds exact width/height in flow */
.scramble-ghost {
  visibility: hidden;
}

/* Random glyph overlaid on the ghost — out of flow, never causes reflow */
.scramble-char {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
}

/* Characters ahead of the cursor — invisible but hold their space */
.scramble-placeholder {
  display: inline;
  opacity: 0;
  user-select: none;
  pointer-events: none;
}

/* Location lines need inline-block so min-height takes effect */
.about__location-line {
  display: inline-block;
}

[data-scramble-on-scroll] {
  opacity: 1;
  transform: none;
}

[data-scramble-on-scroll].is-visible {
  opacity: 1;
  transform: none;
}

.case-study {
  opacity: 1;
  transform: none;
}

.case-study.is-visible {
  opacity: 1;
  transform: none;
}


.header__contact,
.about__link {
  position: relative;
}

.header__contact::after,
.about__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--text-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-out;
}

.header__contact:hover::after,
.about__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.icon {
  transition: transform 0.3s ease-out;
}

.header__contact:hover .icon,
.about__link:hover .icon {
  transform: translate(2px, -2px);
}

.about__intro {
  opacity: 1;
}

.about__bio {
  opacity: 1;
}

.about__photo-wrapper {
  opacity: 1;
}

.work__header {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  [data-scramble-on-scroll],
  .case-study {
    opacity: 1;
    transform: none;
  }
}
