#preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  background: var(--color-paper);
  color: var(--color-accent);
  pointer-events: auto;
  transform: translateY(0);
  transition: transform 1.1s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s ease-out;
}

#preloader.is-leaving {
  transform: translateY(-100%);
}

#preloader.is-skipped {
  display: none;
}

.preloader-mark {
  color: var(--color-accent);
  animation: pl-pulse 1.6s ease-in-out infinite;
}

.preloader-dots {
  display: flex;
  gap: 0.5rem;
}

.preloader-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-accent);
  opacity: 0.25;
  animation: pl-dot 1.4s ease-in-out infinite;
}

.preloader-dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.preloader-dots span:nth-child(3) {
  animation-delay: 0.36s;
}

.logo-lift {
  animation: logo-lift 2.4s ease-in-out infinite;
  transform-origin: 50% 50%;
}

.alert-success {
  border: 1px solid var(--color-line);
  border-radius: 0.75rem;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  padding: 0.9rem 1rem;
}

.field-error {
  margin-top: 0.4rem;
  color: #dc2626;
  font-size: 0.875rem;
}

.capability-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

#expertise > h3 {
  max-width: 19ch;
  margin-bottom: clamp(3.5rem, 6vw, 5.5rem);
  line-height: 1.08;
}

#expertise .skill-grid {
  column-gap: clamp(3rem, 5vw, 5.5rem);
  row-gap: 4rem;
}

.profile-portrait {
  aspect-ratio: 4 / 5;
  max-height: 46rem;
  object-position: center 32%;
}

.capability-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--color-muted);
  line-height: 1.45;
}

.capability-item > span:first-child {
  color: var(--color-accent);
}

.project-card__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0.25rem 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.project-card__meta p {
  max-width: 30rem;
}

.project-card__meta span {
  flex: 0 0 auto;
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-nav {
    gap: 0.8rem;
  }

  .site-nav > a {
    display: none;
  }

  .hero-typing {
    min-height: 700px;
  }

  .hero-typing__inner {
    gap: 1.25rem;
    max-width: 100%;
    overflow: hidden;
    padding: 5rem 1rem 4rem;
  }

  .hero-typing__eyebrow {
    max-width: 22rem;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    line-height: 1.55;
  }

  .hero-typing__heading {
    width: 100%;
    max-width: 11ch;
    font-size: clamp(2.35rem, 11.5vw, 3.25rem);
    line-height: 1.02;
  }

  .hero-typing__word {
    max-width: 100%;
    justify-content: center;
  }

  .hero-typing__word-text {
    white-space: nowrap;
  }

  .hero-typing__cta {
    align-items: center;
    flex-direction: column;
    width: 100%;
  }

  .hero-typing__cue {
    display: none;
  }

  #expertise > h3 {
    margin-bottom: 3rem;
  }

  #expertise .skill-grid {
    row-gap: 3rem;
  }

  .project-card__meta {
    display: block;
  }

  .project-card__meta span {
    display: inline-block;
    margin-top: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preloader-mark,
  .preloader-dots span,
  .logo-lift {
    animation: none;
  }

  #preloader {
    transition-duration: 0.2s;
  }
}
