:root {
  --bg: #05070b;
  --bg-elevated: #080c13;
  --text: #f4f6f8;
  --text-soft: rgba(244, 246, 248, 0.68);
  --text-dim: rgba(244, 246, 248, 0.46);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);
  --earth-glow: rgba(110, 176, 255, 0.16);
  --focus: rgba(138, 195, 255, 0.72);
  --max-content: 1240px;
  --radius: 14px;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.home-page {
  position: relative;
  overflow-x: clip;
}

.page-background {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 26% 44%, var(--earth-glow), transparent 30%),
    linear-gradient(180deg, rgba(8, 12, 19, 0.32) 0%, rgba(5, 7, 11, 0.92) 100%);
  background-image:
    radial-gradient(circle at 26% 44%, var(--earth-glow), transparent 30%),
    linear-gradient(180deg, rgba(8, 12, 19, 0.32) 0%, rgba(5, 7, 11, 0.92) 100%),
    url("/assets/img/hero-earth-poster.webp");
  background-size: auto, auto, cover;
  background-position: center, center, 20% center;
  z-index: 0;
}

.hero-video,
.video-overlay,
.technical-grid,
.video-reset-fade {
  position: absolute;
  inset: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 20% center;
}

.video-overlay {
  background:
    radial-gradient(circle at 28% 48%, rgba(5, 7, 11, 0) 0%, rgba(5, 7, 11, 0.08) 26%, rgba(5, 7, 11, 0.34) 50%, rgba(5, 7, 11, 0.9) 76%, #05070b 100%),
    linear-gradient(90deg, rgba(5, 7, 11, 0.18) 0%, rgba(5, 7, 11, 0.22) 35%, rgba(5, 7, 11, 0.82) 68%, rgba(5, 7, 11, 0.98) 100%);
}

.technical-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent 0%, transparent 30%, rgba(0, 0, 0, 0.48) 56%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 30%, rgba(0, 0, 0, 0.48) 56%, #000 100%);
}

.video-reset-fade {
  background: radial-gradient(circle at 50% 50%, rgba(5, 7, 11, 0.08), rgba(5, 7, 11, 0.82));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.page-background.is-resetting .video-reset-fade {
  opacity: 1;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  width: min(100%, calc(var(--max-content) + 4rem));
  margin: 0 auto;
  padding: 1.75rem 2rem 2rem;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 1.75rem;
}

.hero {
  display: flex;
  align-items: center;
  min-height: 0;
  min-width: 0;
}

.hero-content {
  width: min(100%, 600px);
  margin-left: auto;
  min-width: 0;
}

.hero-accent {
  display: inline-flex;
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, rgba(138, 195, 255, 0.85), rgba(138, 195, 255, 0));
  margin-bottom: 1.5rem;
  position: relative;
}

.hero-accent::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(138, 195, 255, 0.72);
  background: rgba(138, 195, 255, 0.12);
}

.hero-title {
  margin: 0;
  font-size: clamp(3.6rem, 6vw, 6.2rem);
  line-height: 0.96;
  font-weight: 500;
  letter-spacing: 0;
  text-wrap: balance;
}

.syntax {
  color: rgba(138, 195, 255, 0.62);
  font-weight: 400;
}

.hero-text {
  max-width: min(540px, 100%);
  margin: 1.75rem 0 0;
  font-size: clamp(0.96rem, 1.05vw, 1.05rem);
  line-height: 1.85;
  color: var(--text-soft);
}

.entities-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.5rem;
  margin-top: 2.2rem;
  border-top: 1px solid var(--line);
}

.entity-link {
  min-height: 0;
  padding: 0.95rem 0.1rem 0.9rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.entity-link:hover {
  border-color: rgba(138, 195, 255, 0.34);
}

.entity-link:hover .entity-arrow,
.entity-link:focus-visible .entity-arrow {
  transform: translate(2px, -2px);
}

.entity-link:hover .entity-name,
.entity-link:focus-visible .entity-name {
  color: var(--text);
}

.entity-prefix,
.entity-arrow {
  color: rgba(138, 195, 255, 0.72);
}

.entity-name {
  min-width: 0;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.entity-arrow {
  justify-self: end;
  transition: transform 180ms ease;
}

.entity-link-contact {
  grid-column: 1 / -1;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  color: rgba(138, 195, 255, 0.92);
  border-color: rgba(138, 195, 255, 0.28);
}

.entity-link-contact:hover {
  border-color: rgba(138, 195, 255, 0.52);
}

.entity-link-contact .entity-prefix,
.entity-link-contact .entity-name,
.entity-link-contact .entity-arrow {
  color: rgba(138, 195, 255, 0.92);
}

.contact-feedback {
  min-height: 1.25rem;
  margin: 0.7rem 0 0;
  color: rgba(138, 195, 255, 0.84);
  font-size: 0.78rem;
  line-height: 1.45;
}

.site-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.7;
}

.site-footer > * {
  min-width: 0;
}

.footer-identity {
  margin: 0;
  overflow-wrap: anywhere;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
}

.footer-nav a {
  position: relative;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-nav a:focus-visible {
  border-radius: 4px;
}

@media (max-width: 900px) {
  .page-background {
    position: absolute;
    min-height: 100%;
    background-position: center, center, 34% 18%;
  }

  .hero-video {
    object-position: 34% 18%;
  }

  .video-overlay {
    background:
      linear-gradient(180deg, rgba(5, 7, 11, 0.2) 0%, rgba(5, 7, 11, 0.38) 26%, rgba(5, 7, 11, 0.72) 48%, rgba(5, 7, 11, 0.96) 70%, #05070b 100%),
      radial-gradient(circle at 42% 16%, rgba(5, 7, 11, 0) 0%, rgba(5, 7, 11, 0.06) 22%, rgba(5, 7, 11, 0.72) 62%, #05070b 100%);
  }

  .technical-grid {
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.12) 30%, #000 68%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.12) 30%, #000 68%);
  }

  .page-shell {
    width: min(100%, 780px);
    padding: 1.05rem 1rem 1.4rem;
    gap: 1.5rem;
  }

  .hero {
    align-items: end;
    padding-top: min(39svh, 20rem);
  }

  .hero-content {
    margin-left: 0;
    width: 100%;
  }

  .hero-title {
    font-size: clamp(2.35rem, 12vw, 3.6rem);
    line-height: 1;
  }

  .hero-text {
    font-size: 0.96rem;
    line-height: 1.8;
  }

  .entities-nav {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .entity-link {
    padding-block: 0.9rem;
  }

  .entity-link-contact {
    grid-column: auto;
  }

  .site-footer {
    font-size: 0.76rem;
    align-items: flex-start;
  }

  .footer-nav {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .page-shell {
    padding-inline: 0.9rem;
  }

  .hero {
    padding-top: min(41svh, 18rem);
  }

  .hero-content {
    max-width: 20rem;
  }

  .hero-title {
    font-size: clamp(2rem, 11vw, 2.55rem);
  }

  .syntax {
    font-size: 0.92em;
  }

  .hero-text {
    font-size: 0.92rem;
    line-height: 1.72;
  }

  .hero-accent {
    margin-bottom: 1.15rem;
  }

  .entity-link {
    padding-inline: 0.05rem;
  }
}

@media (max-width: 380px) {
  .hero-content {
    max-width: 17.5rem;
  }

  .hero-title {
    font-size: 1.92rem;
  }

  .hero-text {
    font-size: 0.84rem;
    line-height: 1.66;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }

  .hero-video {
    display: none;
  }

  .video-reset-fade {
    display: none;
  }
}
