@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic&display=swap");

/* Site-wide adjustments on top of the Forty theme (main.css).
   Loaded on every page right after main.css. */

/* Banner height (BL-001, BL-033): 62% of the screen on every page (the theme used
   75vh on the home page and 60vh elsewhere). No max-height so large screens keep 62%. */
@media screen and (min-width: 737px) {
  #banner,
  #banner.major {
    height: 62vh;
    min-height: 20em;
    max-height: none;
  }
}

/* Readability (BL-002): the theme's 300 weight looks blurry on the dark background */
body,
input,
select,
textarea {
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#footer .copyright {
  color: rgba(244, 244, 255, 0.6);
}

input::placeholder,
textarea::placeholder {
  color: rgba(244, 244, 255, 0.5) !important;
}

/* The theme's reset sets display:block on sections; keep the hidden attribute working (BL-009) */
[hidden] {
  display: none !important;
}

/* Technology badges: one standard size for the whole site (BL-018).
   Used by .chips (home, client pages) and .tl-stack (experience timeline).
   Each page only sets the container margin. */
.chips,
.tl-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.chips li,
.tl-stack li {
  margin: 0;
  padding: 0.3rem 0.95rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 4px;
  border: solid 1px rgba(212, 212, 255, 0.22);
  background: rgba(212, 212, 255, 0.05);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.chips li:hover,
.tl-stack li:hover {
  border-color: #9bf1ff;
  color: #9bf1ff;
}

/* Galaxy component (BL-018): technology badges floating inside a "space" box.
   Usage on any page:
     <ul class="chips chips-space"><li>React</li>…</ul>
     <script src="…/assets/js/floating-chips.js"></script>
   Standard size: ~160 px tall on desktop (padding 1.35em, row gap 1.75rem,
   EXTRA_HEIGHT 12 px). Standard speed: 3–5 px/s (SPEED_MIN/SPEED_MAX in the script). */
/* Badges drift, bounce off the edges and off each other. Motion comes from
   floating-chips.js, which adds .is-floating; without it the badges keep this
   static layout. */
.chips.chips-space {
  position: relative;
  justify-content: center;
  align-content: center;
  gap: 1.75rem 2.75rem;
  min-height: 8em;
  padding: 1.35em 2.5em;
  overflow: hidden;
  border-radius: 6px;
  border: solid 1px rgba(212, 212, 255, 0.08);
  background: radial-gradient(
      ellipse at 50% 40%,
      rgba(111, 195, 223, 0.08),
      transparent 65%
    ),
    rgba(0, 0, 0, 0.18);
}

/* Faint stars */
.chips.chips-space:before,
.chips.chips-space:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(1px 1px at 8% 22%, #fff, transparent),
    radial-gradient(1px 1px at 23% 78%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 37% 12%, #fff, transparent),
    radial-gradient(1px 1px at 52% 64%, #fff, transparent),
    radial-gradient(1px 1px at 66% 30%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 79% 84%, #fff, transparent),
    radial-gradient(1px 1px at 91% 18%, #fff, transparent),
    radial-gradient(1px 1px at 14% 55%, #fff, transparent);
  opacity: 0.35;
  animation: stars-twinkle 7s ease-in-out infinite alternate;
}

.chips.chips-space:after {
  background-image: radial-gradient(1px 1px at 4% 88%, #fff, transparent),
    radial-gradient(1px 1px at 30% 40%, #fff, transparent),
    radial-gradient(1px 1px at 45% 92%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 60% 8%, #fff, transparent),
    radial-gradient(1px 1px at 72% 58%, #fff, transparent),
    radial-gradient(1px 1px at 86% 44%, #fff, transparent),
    radial-gradient(1px 1px at 97% 70%, #fff, transparent);
  animation-duration: 11s;
  animation-delay: -4s;
}

.chips.chips-space li {
  position: relative;
  z-index: 1;
  white-space: nowrap;
  background: rgba(36, 41, 67, 0.85);
  box-shadow: 0 0 1.25em rgba(155, 241, 255, 0.06);
}

.chips.chips-space li:hover {
  box-shadow: 0 0 1.25em rgba(155, 241, 255, 0.35);
}

.chips.chips-space.is-floating li {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

@keyframes stars-twinkle {
  from {
    opacity: 0.15;
  }
  to {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chips.chips-space:before,
  .chips.chips-space:after {
    animation: none;
  }
}

@media screen and (max-width: 736px) {
  .chips.chips-space {
    gap: 1.5rem 1.75rem;
    padding: 2.5em 1.25em;
  }
}

/* Anchored targets (#jfk, #summa…) land below the fixed header (BL-022) */
[id] {
  scroll-margin-top: 4.5em;
}

/* Menu (BL-004)
   - Hover / keyboard focus: tinted band so you see the option before clicking.
   - Current page (.is-active): white block with dark text.
   - Featured option (.menu-featured, Experience): gold star, always visible. */
#menu ul.links > li > a:not(.button) {
  transition: background-color 0.2s ease, color 0.2s ease;
}

#menu ul.links > li > a:not(.button):hover,
#menu ul.links > li > a:not(.button):focus-visible {
  color: #9bf1ff;
  background-color: rgba(155, 241, 255, 0.08);
  outline: none;
}

/* The theme sets a:hover { color: … !important }, so the active item needs
   !important too to keep its dark text when hovered */
#menu ul.links > li > a.is-active,
#menu ul.links > li > a.is-active:hover,
#menu ul.links > li > a.is-active:focus-visible {
  color: #242943 !important;
  background-color: #ffffff;
  border-radius: 4px;
}

/* Keep the gold star readable on the white active background */
#menu ul.links > li > a.is-active.menu-featured:after {
  color: #c98a4b;
  text-shadow: none;
}

#menu ul.links > li > a.menu-featured:after {
  content: "\f005";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-left: 0.6em;
  font-size: 0.9em;
  color: #e7b788;
  text-shadow: 0 0 0.6em rgba(231, 183, 136, 0.7);
}

/* Arrival highlight (BL-014): when a link lands on an anchor (#jfk, #mision-tic…)
   the target glows briefly so it is clear which element was selected */
@keyframes target-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(155, 241, 255, 0);
  }
  30% {
    box-shadow: 0 0 0 3px rgba(155, 241, 255, 0.6), 0 0 2em rgba(155, 241, 255, 0.25);
  }
}

@keyframes target-glow-inset {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(155, 241, 255, 0);
  }
  30% {
    box-shadow: inset 0 0 0 3px rgba(155, 241, 255, 0.5);
  }
}

/* The timeline reveal starts items 2rem lower; the target must already be in
   place so the browser scrolls to its final position */
.tl-item:target {
  opacity: 1;
  transform: none;
}

.tl-item:target .tl-card,
a.button:target {
  animation: target-glow 1.6s ease 0.4s 2;
}

.spotlights > section:target {
  animation: target-glow-inset 1.6s ease 0.4s 2;
}

@media (prefers-reduced-motion: reduce) {
  .tl-item:target .tl-card,
  a.button:target,
  .spotlights > section:target {
    animation: none;
    box-shadow: 0 0 0 3px rgba(155, 241, 255, 0.6);
  }
}
