html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: #0a0a0a;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: #7bd1fa;
  color: #051425;
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.25rem;
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid #7bd1fa;
  outline-offset: 2px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.skill-chip:hover {
  color: #245682;
  background-color: rgba(230, 239, 250, 1);
}

.skill-chip img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(78%) sepia(42%) saturate(600%) hue-rotate(293deg) brightness(101%) contrast(96%);
}

.skill-chip:hover img {
  filter: brightness(0) saturate(100%) invert(0%) sepia(0%) saturate(100%) hue-rotate(293deg) brightness(50%) contrast(96%);
}

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

#mobile-menu.is-open {
  max-height: 24rem;
  opacity: 1;
}

#nav-toggle[aria-expanded="true"] .nav-icon-open {
  display: none;
}

#nav-toggle[aria-expanded="true"] .nav-icon-close {
  display: block;
}

#nav-toggle[aria-expanded="false"] .nav-icon-open {
  display: block;
}

#nav-toggle[aria-expanded="false"] .nav-icon-close {
  display: none;
}

.hero-typed::after {
  content: "|";
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-typed::after {
    animation: none;
  }
}

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

.profile-photo {
  aspect-ratio: 1;
  object-fit: cover;
}

.experience-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.experience-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.parallax-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  isolation: isolate;
}

.parallax-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.parallax-bg {
  position: absolute;
  /* Extra bleed for translateY parallax (speed × scroll travel ≈ 32% of section height) */
  top: -35%;
  left: 0;
  width: 100%;
  height: 170%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.parallax-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.parallax-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(5, 20, 37, 0.5) 0%,
    rgba(5, 20, 37, 0.72) 50%,
    rgba(5, 20, 37, 0.84) 100%
  );
  pointer-events: none;
}

.parallax-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding-top: 5rem;
  padding-bottom: 4rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .parallax-content {
    padding-top: 6rem;
  }
}

#hero .parallax-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-portrait {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(62vw, 760px);
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-portrait img {
  width: 90%;
  float: right;
  height: 100vh;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: saturate(120%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 50%);
  mask-image: linear-gradient(to right, transparent 0%, #000 50%);
}

#hero .parallax-panel {
  flex: 0 0 auto;
}

.content-panel {
  background: rgba(5, 20, 37, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(68, 71, 72, 0.5);
  border-radius: 0.25rem;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(1, 15, 32, 0.35);
}

@media (min-width: 768px) {
  .content-panel {
    padding: 2rem;
  }

  .section-heading {
    position: sticky;
    top: 6rem;
    align-self: start;
    z-index: 3;
  }
}

.section-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 2.5rem;
  transform: translateX(-50%);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 1.75rem;
  line-height: 1;
  color: rgba(213, 227, 252, 0.55);
  text-decoration: none;
  transition: color 0.25s ease;
}

.section-scroll-hint:hover {
  color: #7bd1fa;
}

@media (prefers-reduced-motion: no-preference) {
  .section-scroll-hint {
    animation: scroll-hint-bob 2.4s ease-in-out infinite;
  }
}

@keyframes scroll-hint-bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .parallax-bg {
    top: 0;
    height: 100%;
    will-change: auto;
  }
}
