:root {
  --bg-deep: #050b1a;
  --bg-mid: #0a1f35;
  --bg-nebula: #122a45;
  --panel: #dceeff;
  --ink: #07111d;
  --ink-soft: #223d59;
  --line: #19344d;
  --accent-cyan: #54e5ff;
  --accent-blue: #4f7dff;
  --accent-violet: #8a7dff;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(76rem 36rem at 108% -8%, rgba(84, 229, 255, 0.26), transparent 60%),
    radial-gradient(52rem 28rem at -8% -16%, rgba(138, 125, 255, 0.26), transparent 62%),
    linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-mid) 46%, var(--bg-nebula) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(84, 229, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 229, 255, 0.11) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.82), transparent 88%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 2px solid rgba(84, 229, 255, 0.32);
  background: linear-gradient(165deg, rgba(220, 238, 255, 0.95), rgba(205, 229, 255, 0.95));
  backdrop-filter: blur(6px);
}

.title-bar {
  width: min(1120px, calc(100vw - 2.2rem));
  margin: 0 auto;
  padding: 0.85rem 0 0.55rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: clamp(60px, 8vw, 86px);
  height: auto;
  border-radius: 10px;
  border: 2px solid rgba(25, 52, 77, 0.28);
  box-shadow: 0 8px 22px rgba(6, 20, 35, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.brand-title {
  margin-top: 0.2rem;
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.site-nav-wrap {
  border-top: 2px solid rgba(84, 229, 255, 0.24);
  border-bottom: 2px solid rgba(84, 229, 255, 0.24);
  background: linear-gradient(90deg, rgba(84, 229, 255, 0.24), rgba(79, 125, 255, 0.22), rgba(138, 125, 255, 0.22));
}

.site-nav {
  width: min(1120px, calc(100vw - 2.2rem));
  margin: 0 auto;
  padding: 0.55rem 0;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-block;
  padding: 0.48rem 0.76rem;
  border: 2px solid rgba(25, 52, 77, 0.34);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 700;
  background: rgba(237, 247, 255, 0.82);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  outline: none;
  background: #f8fdff;
  border-color: var(--line);
  box-shadow: 0 0 0 2px rgba(84, 229, 255, 0.22);
}

.site-nav a[aria-current="page"] {
  background: linear-gradient(95deg, rgba(84, 229, 255, 0.55), rgba(79, 125, 255, 0.56));
  border-color: #11253a;
}

.page {
  width: min(1120px, calc(100vw - 2.2rem));
  margin: 1.2rem auto 2.4rem;
}

.content-section {
  position: relative;
  margin: 1rem 0;
  padding: clamp(1rem, 1.8vw, 1.7rem);
  background: linear-gradient(160deg, rgba(220, 238, 255, 0.98), rgba(205, 230, 255, 0.95));
  border: 2px solid rgba(25, 52, 77, 0.43);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(7, 17, 29, 0.3);
  opacity: 0;
  transform: translateY(14px);
  animation: rise-in 0.56s ease forwards;
}

.content-section::after {
  content: "";
  position: absolute;
  inset: auto 1rem -2px auto;
  width: 130px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-violet));
}

.content-section:nth-child(odd) {
  transform: translateY(14px) rotate(-0.22deg);
}

.content-section:nth-child(even) {
  transform: translateY(14px) rotate(0.22deg);
}

.content-section h1,
.content-section h2 {
  margin: 0 0 0.65rem;
  line-height: 1.18;
}

.content-section h1 {
  font-size: clamp(1.65rem, 4.6vw, 2.35rem);
  letter-spacing: 0.01em;
}

.content-section h2 {
  font-size: clamp(1.1rem, 3.2vw, 1.6rem);
}

.subhead {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
}

.content-section p {
  margin: 0.82rem 0;
  font-size: clamp(1rem, 2.3vw, 1.09rem);
  line-height: 1.62;
}

.footnote {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 2px dashed rgba(25, 52, 77, 0.5);
  background: rgba(248, 253, 255, 0.7);
  font-size: 0.95rem;
}

.footnote p {
  margin: 0;
  line-height: 1.5;
}

.footnote-back {
  margin-left: 0.35rem;
  color: #0f3c63;
  font-weight: 700;
}

sup a {
  color: #0f3c63;
  text-decoration: none;
  font-weight: 700;
}

.section-intro {
  margin-top: 0.25rem;
  color: var(--ink-soft);
}

.page-footer {
  width: min(1120px, calc(100vw - 2.2rem));
  margin: 0 auto 1.5rem;
  padding: 0.7rem 0;
  color: rgba(220, 238, 255, 0.86);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.page-footer a {
  color: #d8dee6;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-footer a:hover,
.page-footer a:focus-visible {
  color: #f0f3f7;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@media (max-width: 700px) {
  .title-bar {
    padding-top: 0.66rem;
  }

  .brand {
    align-items: flex-start;
  }

  .site-nav {
    gap: 0.45rem;
  }

  .site-nav a {
    width: 100%;
    text-align: center;
  }

  .page-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
