:root {
  --space: #030712;
  --space-2: #08142a;
  --navy: #08213f;
  --blue: #0b5f9e;
  --cyan: #7fd8ff;
  --cream: #eadcc4;
  --cream-2: #efe2c9;
  --ink: #071526;
  --red: #c62828;
  --gold: #f5c542;

  --md-primary-fg-color: #08213f;
  --md-accent-fg-color: #7fd8ff;
}

/* Background */
body,
.md-container,
.md-main {
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.9) 1px, transparent 2px),
    radial-gradient(circle at 78% 14%, rgba(255, 255, 255, 0.8) 1px, transparent 2px),
    radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.7) 1px, transparent 2px),
    radial-gradient(circle at 65% 55%, rgba(127, 216, 255, 0.6) 1px, transparent 2px),
    radial-gradient(circle at 90% 70%, rgba(127, 216, 255, 0.4) 1px, transparent 2px),
    linear-gradient(180deg, var(--space-2), var(--space));
  background-size:
    180px 180px,
    260px 260px,
    320px 320px,
    240px 240px,
    420px 420px,
    auto;
}

.md-container {
  position: relative;
}

.md-container::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(127, 216, 255, 0.08), transparent 300px),
    radial-gradient(circle at 80% 15%, rgba(11, 95, 158, 0.10), transparent 350px),
    radial-gradient(circle at 60% 80%, rgba(127, 216, 255, 0.05), transparent 450px);
  z-index: 0;
}

.md-content {
  background: transparent;
}

.md-grid {
  max-width: 94rem;
}

/* Remove footer credit */
.md-footer-meta {
  display: none;
}

/* Header */
.md-header {
  background: rgba(8, 20, 42, 0.82);
  color: #fff7e8;
  border-bottom: 2px solid rgba(127, 216, 255, 0.55);
  box-shadow: none;
  backdrop-filter: blur(4px);
}

.md-header__title {
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.045em;
  color: #fff7e8;
  text-shadow: 2px 2px 0 #000;
}

.md-header__button {
  color: #fff7e8;
}

.md-search__form {
  background: rgba(3, 7, 18, 0.92);
  border: 2px solid var(--cyan);
  box-shadow: 3px 3px 0 #000;
}

.md-search__input {
  color: #fff7e8;
  font-family: "Courier New", monospace;
}

.md-search__input::placeholder {
  color: rgba(255, 247, 232, 0.75);
}

.md-search__icon {
  color: var(--cyan);
}

/* Left sidebar */
.md-sidebar--primary {
  width: 14rem;
}

.md-sidebar--primary .md-sidebar__scrollwrap {
  background:
    linear-gradient(rgba(127, 216, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 216, 255, 0.045) 1px, transparent 1px),
    rgba(8, 33, 63, 0.97);
  background-size: 14px 14px;
  border: 2px solid var(--cyan);
  box-shadow: 5px 5px 0 #000;
  margin: 1rem 0.45rem;
  padding: 0.55rem;
}

/* Reduce nested sidebar indentation */
.md-sidebar--primary .md-nav .md-nav {
  margin-left: 0.25rem;
}

.md-sidebar--primary .md-nav__list .md-nav__list {
  padding-left: 0.5rem;
}

/* Right table of contents */
.md-sidebar--secondary .md-sidebar__scrollwrap {
  background: rgba(8, 33, 63, 0.97);
  border: 2px solid var(--cyan);
  box-shadow: 5px 5px 0 #000;
  margin: 1rem 0.45rem;
  padding: 0.55rem;
}

.md-sidebar--secondary .md-nav__title {
  background: #0b355f !important;
  color: var(--gold) !important;
  border: 1px solid var(--cyan);
  box-shadow: none !important;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  font-weight: 900;
}

.md-sidebar--secondary .md-nav__link {
  color: #e8f6ff !important;
  opacity: 1 !important;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
}

.md-sidebar--secondary .md-nav__link--active {
  color: var(--gold) !important;
}

/* Sidebar titles */
.md-nav__title {
  background: #0b355f !important;
  color: #fff7e8 !important;
  border: 1px solid var(--cyan);
  box-shadow: none !important;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.035em;
}

/* Sidebar section headers */
.md-sidebar--primary .md-nav__item--section > .md-nav__link {
  background: #0b355f;
  color: var(--gold) !important;
  border-left: 4px solid var(--cyan);
  border-bottom: 1px solid rgba(127, 216, 255, 0.45);
  margin-top: 0.75rem;
  padding: 0.38rem 0.55rem;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  font-weight: 900;
}

/* Sidebar links */
.md-sidebar--primary .md-nav__link {
  color: #e8f6ff !important;
  opacity: 1 !important;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: normal !important;
  overflow: visible !important;
  line-height: 1.25;
  word-break: normal;
  overflow-wrap: break-word;
}

.md-sidebar--primary .md-nav__link .md-ellipsis {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  overflow-wrap: anywhere;
}

.md-sidebar--primary .md-nav__icon {
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

.md-sidebar--primary .md-nav__link:hover {
  color: var(--gold) !important;
  text-decoration: underline;
}

/* Selected sidebar item */
.md-sidebar--primary .md-nav__link--active {
  background: #f3e8d0 !important;
  color: var(--ink) !important;
  border-left: 6px solid var(--gold);
  box-shadow: 3px 3px 0 #000;
  padding-left: 0.45rem;
  font-weight: 900;
  box-sizing: border-box;
  max-width: 100%;
}

/* Main content panel */
.md-content__inner {
  background: var(--cream-2);
  color: var(--ink);
  border: 3px solid var(--cyan);
  box-shadow: 8px 8px 0 #000;
  padding: 2rem;
  margin-top: 1.25rem;
}

/* Breadcrumbs */
.md-path,
.md-path a {
  color: #375c7d !important;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

/* Main text */
.md-typeset {
  color: var(--ink);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.93rem;
  line-height: 1.55;
  font-weight: 500;
}

.md-typeset p,
.md-typeset li {
  max-width: 75ch;
}

.md-typeset strong {
  font-weight: 700;
}

.md-typeset blockquote {
  border-left: 4px solid var(--blue);
  background: rgba(11, 95, 158, 0.08);
  padding: 0.5rem 1rem;
}

/* Headings */
.md-typeset h1 {
  font-family: Impact, "Arial Black", sans-serif;
  color: #061526;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 2.5rem;
  border-bottom: 5px solid #111;
  padding-bottom: 0.45rem;
  text-shadow: 2px 2px 0 #b6e8ff;
}

.md-typeset h2 {
  font-family: Impact, "Arial Black", sans-serif;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 3px solid var(--red);
  padding-bottom: 0.15rem;
}

.md-typeset h3 {
  font-family: "Courier New", monospace;
  color: #9f1d1d;
  text-transform: uppercase;
  font-weight: 700;
}

/* Links */
.md-typeset a {
  color: #064bad;
  font-weight: 700;
  text-decoration: underline;
}

.md-typeset a:hover {
  color: var(--red);
}

/* Code */
.md-typeset code {
  background: #111827;
  color: #b7ffb7;
  border: 1px solid var(--cyan);
}

.md-typeset pre {
  background: #111827 !important;
  border: 2px solid var(--cyan);
  border-left: 6px solid var(--red);
}

/* Cards */
.nasa-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 1.5rem 0;
}

.nasa-card {
  background: #0b355f;
  color: #fff7e8;
  border: 2px solid var(--cyan);
  border-left: 7px solid var(--red);
  box-shadow: 5px 5px 0 #000;
  padding: 1rem;
}

.nasa-card h3 {
  color: var(--gold);
  margin-top: 0;
}

.nasa-card a {
  color: var(--cyan);
}

/* Tables */
.md-typeset table:not([class]) {
  border: 2px solid #111;
}

.md-typeset table:not([class]) th {
  background: var(--navy);
  color: var(--gold);
  text-transform: uppercase;
}

/* Mobile */
@media screen and (max-width: 76.2344em) {
  .md-content__inner {
    margin: 0.75rem;
    padding: 1rem;
  }

  .md-typeset h1 {
    font-size: 1.8rem;
  }
}