/* Scope the supplied background and layout to the homepage introduction. */
body > #intro.hero-background {
  background-color: #03152e;
  background-image: none;
}

body > #intro.hero-background::before {
  content: "";
  display: block;
  position: absolute;
  inset: -24px;
  background-image: linear-gradient(rgba(1, 12, 30, .28), rgba(1, 12, 30, .28)), url("assets/hero-technology-background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  mask-image: none;
  pointer-events: none;
  z-index: 0;
  animation: homepage-background-drift 20s ease-in-out infinite alternate;
}

@keyframes homepage-background-drift {
  from { transform: translate3d(-10px, -6px, 0) scale(1); }
  to { transform: translate3d(10px, 6px, 0) scale(1.035); }
}

@media (prefers-reduced-motion: reduce) {
  body > #intro.hero-background::before { animation: none; transform: none; }
}

@media print {
  body > #intro.hero-background::before { animation: none; transform: none; }
}

#intro.hero-background > .galaxy-stars {
  display: none;
}

#intro.hero-background > .hero-inner {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  grid-template-areas: "copy portrait";
  width: min(1440px, calc(100% - 64px));
  gap: 48px;
  padding: 32px 0 0;
}

#intro.hero-background .hero-copy {
  grid-area: copy;
  min-width: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .65);
  padding-block: 32px 64px;
}

#intro.hero-background h1 {
  font-size: 56px;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

#intro.hero-background .name-en {
  font-size: 30px;
  line-height: 1.35;
}

#intro.hero-background .hero-visual {
  grid-area: portrait;
  min-width: 0;
  justify-items: center;
  align-self: stretch;
  align-content: end;
}

#intro.hero-background .hero-portrait-card {
  margin-inline: auto;
  width: min(360px, 100%);
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

#intro.hero-background .hero-portrait-card::before,
#intro.hero-background .hero-portrait-card::after,
#intro.hero-background .portrait-accent {
  display: none;
}

#intro.hero-background .hero-portrait-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#intro.hero-background .tech-stack span {
  max-width: 100%;
  overflow-wrap: anywhere;
  background: rgba(3, 21, 46, .8);
}

@media (min-width: 981px) and (max-width: 1200px) {
  #intro.hero-background h1 { font-size: 44px; }
  #intro.hero-background .name-en { font-size: 26px; }
  #intro.hero-background > .hero-inner { gap: 32px; }
}

@media (max-width: 980px) {
  #intro.hero-background > .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "portrait";
    width: min(720px, calc(100% - 40px));
    gap: 32px;
  }

  #intro.hero-background h1 { font-size: 44px; }
  #intro.hero-background .hero-copy { padding-block: 12px 0; }
}

@media (max-width: 720px) {
  #intro.hero-background > .hero-inner {
    width: calc(100% - 32px);
  }

  #intro.hero-background h1 { font-size: 36px; }
  #intro.hero-background .name-en { font-size: 24px; }
  #intro.hero-background .hero-portrait-card { width: min(350px, 100%); }
}
