html.site-splash-active,
html.site-splash-active body {
  overflow: hidden;
}

.site-splash,
.site-splash * {
  box-sizing: border-box;
}

.site-splash[hidden],
.site-splash [hidden],
.home-projects-message[hidden],
.home-projects-message [hidden] {
  display: none !important;
}

.site-splash {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  height: 100dvh;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom));
  overflow: hidden;
  overscroll-behavior: contain;
  isolation: isolate;
  color: #fff;
  background: radial-gradient(ellipse at 50% 42%, #0b2c71 0%, #091b48 30%, #09132c 61%, #060b18 100%);
  font-family: Inter, Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  opacity: 1;
  transition: opacity 350ms ease;
}

.site-splash--leaving {
  opacity: 0;
  pointer-events: none;
}

.site-splash__stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.site-splash__stars span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  color: #99d535;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
  opacity: 0.65;
}

.site-splash__stars span:nth-child(1) { top: 28%; left: 19%; }
.site-splash__stars span:nth-child(2) { top: 14%; left: 50.5%; color: #fff; }
.site-splash__stars span:nth-child(3) { top: 22%; right: 22%; width: 4px; height: 4px; color: #93c5fd; }
.site-splash__stars span:nth-child(4) { top: 62%; right: 16%; opacity: 0.4; }
.site-splash__stars span:nth-child(5) { top: 66%; left: 14%; color: #bae6fd; opacity: 0.4; }
.site-splash__stars span:nth-child(6) { top: 39%; right: 32%; width: 2px; height: 2px; color: #fff; }

.site-splash__brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 30rem);
  margin: 0 auto;
  padding-bottom: 1rem;
  text-align: center;
}

.site-splash__emblem {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(10rem, 27vh, 14rem);
  height: clamp(10rem, 27vh, 14rem);
  margin-bottom: 1.5rem;
}

.site-splash__aura {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 95, 202, 0.55), rgba(153, 213, 53, 0.14) 55%, transparent 75%);
  filter: blur(18px);
  pointer-events: none;
  animation: site-splash-aura 3.5s ease-in-out infinite;
}

.site-splash__orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  animation: site-splash-orbit 18s linear infinite;
}

.site-splash__orbit--reverse {
  animation-duration: 24s;
  animation-direction: reverse;
}

.site-splash__logo {
  position: relative;
  display: block;
  width: 36%;
  height: 40%;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 0 18px rgba(255, 255, 255, 0.35));
  animation: site-splash-float 4s ease-in-out infinite;
}

.site-splash .site-splash__title {
  margin: 0 0 0.6rem;
  padding: 0;
  color: #fff;
  font-family: Montserrat, Inter, system-ui, sans-serif;
  font-size: clamp(1.125rem, 4.5vw, 1.875rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.site-splash .site-splash__tagline {
  margin: 0;
  padding: 0;
  color: #cbd5e1;
  font-family: inherit;
  font-size: clamp(0.6875rem, 2.8vw, 0.8125rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.025em;
  text-wrap: balance;
}

.site-splash__loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 14.375rem);
  margin-top: 2.75rem;
}

.site-splash__track {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.18);
}

.site-splash__progress {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0133a2, #306eff 30%, #99d535 90%, #b8f25b);
  box-shadow: 0 0 8px rgba(153, 213, 53, 0.7);
  transition: width 250ms ease-out;
}

.site-splash__percentage {
  display: block;
  margin-top: 0.625rem;
  color: #a7df4b;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  letter-spacing: 0.06em;
}

.site-splash .site-splash__status {
  min-height: 2.6em;
  margin: 0.875rem 0 0;
  padding: 0;
  color: #a9bad5;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.5;
  text-wrap: balance;
}

.site-splash .site-splash__skip {
  margin: 0.625rem 0 0;
  padding: 0.625rem 0.875rem;
  border: 1px solid rgba(203, 213, 225, 0.35);
  border-radius: 0.5rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.04);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.site-splash .site-splash__skip:hover {
  border-color: #99d535;
  background: rgba(153, 213, 53, 0.1);
}

.site-splash .site-splash__skip:focus-visible,
.home-projects-message__retry:focus-visible {
  outline: 2px solid #99d535;
  outline-offset: 4px;
}

.site-splash__waves {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: clamp(4rem, 13vh, 8rem);
  pointer-events: none;
  opacity: 0.8;
  animation: site-splash-waves 6s ease-in-out infinite;
}

.home-projects-message {
  width: min(100%, 40rem);
  margin: auto;
  padding: 2rem 1.25rem;
  color: #fff;
  font-family: Montserrat, system-ui, sans-serif;
  text-align: center;
}

#content-corousel {
  background-color: #091b48;
}

#project-carousel[data-project-load-error] {
  background-color: #091b48;
}

#project-carousel[data-project-load-error] [data-project-page-title] {
  font-size: clamp(2rem, 6vw, 4rem);
}

#project-carousel[data-project-load-error] [hidden] {
  display: none !important;
}

#home-projects-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.home-projects-message .home-projects-message__title {
  margin: 0 0 0.75rem;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.4;
}

.home-projects-message .home-projects-message__text {
  margin: 0;
  padding: 0;
  color: #d5deee;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.7;
}

.home-projects-message__retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 1.25rem;
  padding: 0.625rem 1.125rem;
  border: 1px solid #99d535;
  border-radius: 0.75rem;
  color: #0b2045;
  background: #99d535;
  font: 600 0.875rem / 1.5 Montserrat, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.home-projects-message__retry:hover {
  background: #afe55b;
}

.home-projects-message--cards {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 40rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  color: #0f2855;
  background: #fff;
}

.home-projects-message--cards .home-projects-message__text {
  color: #52627a;
}

@keyframes site-splash-orbit {
  to { transform: rotate(360deg); }
}

@keyframes site-splash-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes site-splash-aura {
  0%, 100% { transform: scale(0.95); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

@keyframes site-splash-waves {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-3px); opacity: 0.95; }
}

@media (max-height: 560px) {
  .site-splash { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .site-splash__brand { padding-bottom: 0; }
  .site-splash__emblem { width: 8rem; height: 8rem; margin-bottom: 0.5rem; }
  .site-splash .site-splash__title { font-size: 1.25rem; margin-bottom: 0.25rem; }
  .site-splash__loader { margin-top: 1rem; }
  .site-splash .site-splash__status { min-height: 0; margin-top: 0.5rem; }
  .site-splash .site-splash__skip { margin-top: 0.5rem; padding: 0.375rem 0.75rem; }
  .site-splash__waves { height: 3.25rem; opacity: 0.5; }
}

@media (max-height: 380px) {
  .site-splash__emblem { width: 5.5rem; height: 5.5rem; margin-bottom: 0.25rem; }
  .site-splash .site-splash__title { font-size: 1rem; }
  .site-splash__loader { margin-top: 0.625rem; }
  .site-splash__percentage { margin-top: 0.375rem; }
  .site-splash .site-splash__status { margin-top: 0.375rem; }
}

@media (prefers-reduced-motion: reduce) {
  .site-splash,
  .site-splash *,
  .site-splash *::before,
  .site-splash *::after {
    animation: none !important;
    transition: none !important;
  }
}
