:root {
  --panel-strong: rgba(16, 30, 53, 0.96);
  --blue-soft: #8ddfff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 78%);
}

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

.page {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 28px));
  margin: 18px auto;
}

.page > :not(.topbar) {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

.page > main,
.page > section,
.page > footer,
.page > .hero,
.page > .panel,
.page > .site-footer {
  contain: layout paint style;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 11, 20, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  contain: layout paint style;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-left: 8px;
  contain: layout paint style;
}

.brand img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(0, 210, 255, 0.28));
}

.brand strong {
  display: block;
  font-family: "Fugaz One", "Inter", sans-serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: 0.02em;
}

.brand span span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  contain: layout style;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid rgba(145, 203, 255, 0.18);
  border-radius: 999px;
  background: rgba(18, 33, 58, 0.82);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  transform: translateY(-1px);
  border-color: rgba(0, 210, 255, 0.5);
  background: rgba(27, 52, 88, 0.92);
}

.site-footer {
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(7, 14, 27, 0.96) 0%, rgba(4, 11, 21, 0.96) 100%);
  box-shadow: var(--shadow);
  contain: layout paint style;
}

.site-footer__copy {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.site-footer__copy p {
  margin: 0;
}

.site-footer__copy p + p {
  margin-top: 6px;
}

.site-footer__copy a {
  color: var(--blue-soft);
  font-weight: 800;
}

@media (max-width: 640px) {
  .page {
    width: calc(100% - 16px);
    margin: 8px auto;
  }

  .topbar {
    flex-direction: column;
  }

  .brand img {
    width: 64px;
    height: 64px;
  }

  .nav {
    width: 100%;
    justify-content: stretch;
  }

  .nav a {
    flex: 1 1 130px;
  }
}
