/* Color Settings */
/* https://github.com/squidfunk/mkdocs-material/blob/6b5035f5580f97532d664e3d1babf5f320e88ee9/src/assets/stylesheets/main/_colors.scss */
/* https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#custom-colors */
:root > * {
  --md-primary-fg-color: #ffffff;
  --md-primary-bg-color: #1d1d20;

  --md-default-fg-color: #1d1d20;
  --md-default-bg-color: #ffffff;

  --md-body-bg-color: #22272e;
  --md-header-bg-color: rgba(255, 255, 255, 0.6);

  --md-code-fg-color: #1d1d20;
  --md-code-bg-color: #f5f5f5;

  --md-accent-fg-color: #999;

  --md-admonition-fg-color: #1d1d20;

  --md-typeset-color: #1d1d20;
  --md-typeset-a-color: #1565c0;

  --md-typeset-btn-color: #1565c0;
  --md-typeset-btn-hover-color: #1e88e5;

  --md-admonition-icon--pythontutor: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19.14 7.5A2.86 2.86 0 0 1 22 10.36v3.78A2.86 2.86 0 0 1 19.14 17H12c0 .39.32.96.71.96H17v1.68a2.86 2.86 0 0 1-2.86 2.86H9.86A2.86 2.86 0 0 1 7 19.64v-3.75a2.85 2.85 0 0 1 2.86-2.85h5.25a2.85 2.85 0 0 0 2.85-2.86V7.5h1.18m-4.28 11.79c-.4 0-.72.3-.72.89 0 .59.32.71.72.71a.71.71 0 0 0 .71-.71c0-.59-.32-.89-.71-.89m-10-1.79A2.86 2.86 0 0 1 2 14.64v-3.78A2.86 2.86 0 0 1 4.86 8H12c0-.39-.32-.96-.71-.96H7V5.36A2.86 2.86 0 0 1 9.86 2.5h4.28A2.86 2.86 0 0 1 17 5.36v3.75a2.85 2.85 0 0 1-2.86 2.85H8.89a2.85 2.85 0 0 0-2.85 2.86v2.68H4.86M9.14 5.71c.4 0 .72-.3.72-.89 0-.59-.32-.71-.72-.71-.39 0-.71.12-.71.71s.32.89.71.89Z"/></svg>');
  --md-admonition-pythontutor-color: #eee;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #22272e;
  --md-primary-bg-color: #adbac7;

  --md-default-fg-color: #adbac7;
  --md-default-bg-color: #22272e;

  --md-body-bg-color: #22272e;
  --md-header-bg-color: rgba(34, 39, 46, 0.8);

  --md-code-fg-color: #adbac7;
  --md-code-bg-color: #1d2126;

  --md-accent-fg-color: #aaa;

  --md-admonition-fg-color: #adbac7;

  --md-footer-fg-color: #adbac7;

  --md-typeset-color: #adbac7;
  --md-typeset-a-color: #64b5f6;

  --md-typeset-btn-color: #64b5f6;
  --md-typeset-btn-hover-color: #42a5f5;

  --md-admonition-pythontutor-color: #30363f;
}

[data-md-color-scheme="slate"][data-md-color-primary="black"],
[data-md-color-scheme="slate"][data-md-color-primary="white"] {
  --md-typeset-a-color: #64b5f6;
}

[data-md-color-primary="black"] .md-header {
  background-color: var(--md-header-bg-color);
}

.md-header {
  box-shadow: none;
  transition: none;
  backdrop-filter: saturate(180%) blur(20px); /* Gaussian blur */
  -webkit-backdrop-filter: saturate(180%) blur(20px); /* Safari */
  background-color: var(--md-header-bg-color);
}

/* https://github.com/squidfunk/mkdocs-material/issues/4832#issuecomment-1374891676 */
.md-nav__link[for] {
  color: var(--md-default-fg-color) !important;
}

/* Chapter icons in primary sidebar menu */
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link .md-ellipsis::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.45em;
  vertical-align: -0.18em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(1) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/book-open-outline.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/book-open-outline.svg");
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(2) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/robot-outline.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/robot-outline.svg");
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(3) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/chart-line.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/chart-line.svg");
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(4) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/brain.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/brain.svg");
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(5) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/text-box-outline.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/text-box-outline.svg");
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(6) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/tune-variant.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/tune-variant.svg");
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(7) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/dna.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/dna.svg");
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(8) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/image-outline.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/image-outline.svg");
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(9) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/auto-fix.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/auto-fix.svg");
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(10) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/creation-outline.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/creation-outline.svg");
}
.md-nav--primary > .md-nav__list > .md-nav__item:nth-child(11) > .md-nav__link .md-ellipsis::before {
  -webkit-mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/gamepad-variant-outline.svg");
  mask-image: url("https://cdn.jsdelivr.net/npm/@mdi/svg/svg/gamepad-variant-outline.svg");
}

/* Figure class */
.animation-figure {
  border-radius: 0.3rem;
  display: block;
  margin: 0 auto;
  box-shadow: var(--md-shadow-z2);
}

/* Cover image class */
.cover-image {
  width: 28rem;
  height: auto;
  border-radius: 0.3rem;
  display: block;
  margin: 0 auto;
  box-shadow: var(--md-shadow-z2);
}

/* Center Markdown Tables (requires md_in_html extension) */
.center-table {
  text-align: center;
}

/* Reset alignment for table cells */
.md-typeset .center-table :is(td, th):not([align]) {
  text-align: initial;
}

/* Font size */
.md-typeset {
  font-size: 0.75rem;
  line-height: 1.5;
}

.md-typeset pre {
  font-size: 0.95em;
}

/* Markdown Header */
/* https://github.com/squidfunk/mkdocs-material/blob/dcab57dd1cced4b77875c1aa1b53467c62709d31/src/assets/stylesheets/main/_typeset.scss */
.md-typeset h1 {
  font-weight: 400;
  color: var(--md-default-fg-color);
}

.md-typeset h2 {
  font-weight: 400;
}

.md-typeset h3 {
  font-weight: 500;
}

.md-typeset h5 {
  text-transform: none;
}

.md-typeset a:hover {
  color: var(--md-typeset-a-color);
  text-decoration: underline;
}

.md-typeset code {
  border-radius: 0.2rem;
}

.highlight span.filename {
  font-weight: normal;
}

/* font-family setting for Win10 */
body {
  --md-text-font-family: -apple-system, BlinkMacSystemFont,
    var(--md-text-font, _), Helvetica, Arial, sans-serif;
  --md-code-font-family: var(--md-code-font, _), SFMono-Regular, Consolas, Menlo,
    -apple-system, BlinkMacSystemFont, var(--md-text-font, _), monospace;
}

/* max height of code block */
/* https://github.com/squidfunk/mkdocs-material/issues/3444 */
.md-typeset pre > code {
  max-height: 25rem;
}

/* Make the picture not glare in dark theme */
[data-md-color-scheme="slate"] .md-typeset img,
[data-md-color-scheme="slate"] .md-typeset svg,
[data-md-color-scheme="slate"] .md-typeset video {
  filter: brightness(0.85) invert(0.05);
}

/* landing page */
.header-img-div {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  width: 100%; /* Default to full width */
}

/* Admonition for python tutor */
.md-typeset .admonition.pythontutor,
.md-typeset details.pythontutor {
  border-color: var(--md-default-fg-color--lightest);
  margin-top: 0;
  margin-bottom: 1.5625em;
}

.md-typeset .admonition:focus-within,
.md-typeset details:focus-within {
  box-shadow: var(--md-shadow-z1);
}

.md-typeset .pythontutor > .admonition-title,
.md-typeset .pythontutor > summary {
  background-color: var(--md-code-bg-color);
}
.md-typeset .pythontutor > .admonition-title::before,
.md-typeset .pythontutor > summary::before {
  background-color: rgb(55, 118, 171);
  -webkit-mask-image: var(--md-admonition-icon--pythontutor);
  mask-image: var(--md-admonition-icon--pythontutor);
}

.md-typeset .admonition-title:before,
.md-typeset summary:before {
  width: 1.25em;
}

/* code block tabs */
.md-typeset .tabbed-labels>label {
  font-size: 0.61rem;
}

.md-typeset .tabbed-labels--linked>label>a {
  padding: .78125em 1.0em .625em;
}

/* header banner */
.md-banner {
  background-color: var(--md-code-bg-color);
  color: var(--md-default-fg-color);
  font-size: 0.75rem;
}

.md-banner .banner-svg svg {
  margin-right: 0.3rem;
  height: 0.63rem;
  fill: var(--md-default-fg-color);
}

.pythontutor-iframe {
  width: 100%;
  height: 100%;
  max-width: 125% !important;
  max-height: 225% !important;
  transform: scale(0.8);
  transform-origin: top left;
  border: none;
}

/* .pythontutor-iframe {
  width: 125%;
  height: 125%;
  max-width: 125% !important;
  max-height: 125% !important;
  transform: scale(0.8);
  transform-origin: top left;
  border: none;
} */

/* landing page container */
.home-div {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  font-size: 0.9rem;
  padding: 3em 2em;
  text-align: center;
}

.section-content {
  width: 100%;
  height: auto;
  max-width: 70vw;
}

/* rounded button */
.rounded-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10em;
  margin: 0 0.1em;
  padding: 0.6em 1.3em;
  border: none;
  background-color: var(--md-typeset-btn-color);
  color: var(--md-primary-fg-color) !important;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.rounded-button:hover {
  background-color: var(--md-typeset-btn-hover-color);
}

.rounded-button span {
  margin: 0;
  margin-bottom: 0.07em;
  white-space: nowrap;
}

.rounded-button svg {
  fill: var(--md-primary-fg-color);
  width: auto;
  height: 1.2em;
  margin-right: 0.5em;
}

/* device image */
.device-on-hover {
  width: auto;
  transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

a:hover .device-on-hover {
  filter: drop-shadow(0 0 0.2rem rgba(0, 0, 0, 0.15));
  transform: scale(1.02);
}

/* text button */
.reading-media {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 32vw;
}

.media-block {
  height: 100%;
  margin: 0 0.2em;
}

.text-button {
  width: auto;
  color: var(--md-typeset-btn-color);
  text-decoration: none;
  text-align: center;
  margin: 2.7em auto;
}

.text-button span {
  white-space: nowrap;
}

.text-button svg {
  display: inline-block;
  fill: var(--md-typeset-btn-color);
  width: auto;
  height: 0.9em;
  background-size: cover;
  padding-top: 0.17em;
  margin-left: 0.15em;
}

a:hover .text-button span {
  text-decoration: underline;
}

/* hero image */
.hero-div {
  height: min(84vh, 75vw);
  width: min(112vh, 100vw);
  margin: 0 auto;
  margin-top: -2.4rem;
  padding: 0;
  position: relative;
  font-size: min(1.8vh, 2.5vw);
  font-weight: normal;
}

.hero-bg {
  height: 100%;
  width: 100%;
  object-fit: cover;
  position: absolute;
}

/* hover on the planets */
.hero-div > a > img {
  width: auto;
  position: absolute;
  transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

.hero-div > a > span {
  margin: 0;
  position: absolute;
  transform: translateX(-50%) translateY(-50%);
  white-space: nowrap; /* prevent line breaks */
  color: white;
}

.hero-div > a:hover > img {
  filter: brightness(1.15) saturate(1.1)
    drop-shadow(0 0 0.5rem rgba(255, 255, 255, 0.2));
  transform: scale(1.03);
}

.hero-div > a:hover > span {
  text-decoration: underline;
  color: var(--md-typeset-btn-color);
}

.heading-div {
  width: 100%;
  position: absolute;
  transform: translateX(-50%);
  left: 50%;
  bottom: min(2vh, 3vw);
  pointer-events: none;
  color: #fff;
}

/* code badge */
.code-badge {
  width: 100%;
  height: auto;
  margin: 1em auto;
}

.code-badge img {
  height: 1.07em;
  width: auto;
}

/* brief intro */
.intro-container {
  display: flex;
  align-items: center;
  margin: 2em auto;
}

.intro-image {
  flex-shrink: 0;
  flex-grow: 0;
  width: 55%;
  border-radius: 0.5em;
  box-shadow: var(--md-shadow-z2);
}

.intro-text {
  flex-grow: 1; /* fill the space */
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  align-items: flex-start;
  width: fit-content;
  margin: 2em;
}

.intro-text > div {
  align-self: flex-start;
  width: auto;
  margin: 0 auto;
}

.endor-text {
  width: 50%;
}

.intro-quote {
  color: var(--md-accent-fg-color);
  font-weight: bold;
}

/* contributors table */
.profile-div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 40em;
  margin: 1em auto;
}

.profile-cell {
  flex: 1; /* even distribution */
  flex-basis: 20%;
  margin: 1em 0.5em;
  text-align: center;
}

.profile-img {
  width: 5em;
  border-radius: 50%;
  margin-bottom: 0.5em;
}

.giscus-container {
  width: 40em;
  max-width: 100%;
  margin: 0 auto;
}

/* Hide navigation */
@media screen and (max-width: 76.25em) {
  .section-content {
    max-width: 95vw;
  }

  .reading-media {
    height: 33vw;
  }

  .contrib-image {
    width: 100%;
  }
}

/* Hide table of contents */
@media screen and (max-width: 60em) {
  .home-div {
    font-size: 0.75rem;
  }

  .intro-container {
    flex-direction: column;
  }

  .intro-text {
    width: auto;
    order: 2;
    margin: 0 auto;
  }

  .endor-text {
    width: auto;
    margin: 0 auto;
  }

  .intro-image {
    width: 100%;
    order: 1;
    margin-bottom: 1em;
  }

  .text-button {
    margin: 0.7em auto;
  }
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ================================================================
   HOMEPAGE — Sci-Fi Neuron Network Landing Page
   ================================================================ */

/* Force full-width layout and dark background on the homepage */
body.home-page,
body.home-page .md-container,
body.home-page .md-main,
body.home-page .md-main__inner,
body.home-page .md-content,
body.home-page .md-content__inner {
  background-color: #0a0a1a !important;
}

.home-page .md-main__inner.md-grid {
  max-width: none;
  margin: 0;
  padding: 0;
  padding-inline: 0;
}

.home-page .md-content {
  max-width: none;
  margin: 0;
  padding: 0;
}

.home-page .md-content__inner {
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
}

.home-page .md-main {
  margin-top: 0;
}

.home-page .md-typeset h1,
.home-page .md-typeset h2 {
  color: inherit;
}

.home-page .md-sidebar {
  display: none;
}

/* Transparent dark header floating over the hero */
.home-page .md-header {
  background: rgba(10, 10, 26, 0.45) !important;
  backdrop-filter: saturate(150%) blur(16px) !important;
  -webkit-backdrop-filter: saturate(150%) blur(16px) !important;
  box-shadow: 0 1px 0 rgba(100, 180, 255, 0.08);
}

.home-page .md-header[data-md-state="shadow"] {
  box-shadow: 0 1px 0 rgba(100, 180, 255, 0.08);
}

.home-page .md-header .md-header__title,
.home-page .md-header .md-header__button,
.home-page .md-header .md-logo {
  color: #e0f0ff;
}

.home-page .md-header .md-search__input {
  color: #e0f0ff;
  background-color: rgba(255, 255, 255, 0.08);
}

.home-page .md-header .md-search__input::placeholder {
  color: rgba(224, 240, 255, 0.4);
}

/* Remove any inherited top spacing from Material typeset on the homepage */
.home-page article.md-content__inner,
.home-page .md-content__inner.md-typeset,
.home-page article.md-content__inner.md-typeset {
  padding-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-top: 0 !important;
}

/* --- Hero Section --- */
.home-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 540px;
  overflow: hidden;
  background: #0a0a1a;
}

#neuron-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.home-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.home-hero__content {
  text-align: center;
  pointer-events: auto;
  max-width: 600px;
  padding: 0 1.5rem;
}

.home-hero__title,
.home-page .md-typeset .home-hero__title {
  margin: 0 0 0.6rem !important;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.home-hero__title-main {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: #ffffff;
  text-shadow:
    0 0 40px rgba(0, 200, 255, 0.3),
    0 0 80px rgba(0, 150, 255, 0.15);
}

.home-hero__title-sub {
  display: block;
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  color: rgba(160, 215, 255, 0.85);
  font-weight: 400;
  text-shadow: 0 0 30px rgba(0, 180, 255, 0.2);
}

.home-hero__tagline {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: rgba(180, 210, 240, 0.55);
  margin: 0 0 2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-hero__actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.home-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

.home-hero__cta--primary {
  background: linear-gradient(135deg, #0077cc 0%, #00c8ff 100%);
  color: #ffffff;
  box-shadow:
    0 4px 20px rgba(0, 180, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.home-hero__cta--primary:hover {
  background: linear-gradient(135deg, #008ee6 0%, #33d4ff 100%);
  box-shadow:
    0 6px 30px rgba(0, 200, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  color: #ffffff;
  text-decoration: none;
}

.home-hero__cta--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(200, 225, 255, 0.8);
  border: 1px solid rgba(100, 180, 255, 0.2);
  backdrop-filter: blur(8px);
}

.home-hero__cta--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e0f0ff;
  border-color: rgba(100, 200, 255, 0.4);
  transform: translateY(-2px);
  text-decoration: none;
}

.home-hero__cta svg {
  flex-shrink: 0;
}

/* Scroll indicator */
.home-hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(180, 210, 240, 0.35);
  z-index: 2;
  animation: home-float 2.5s ease-in-out infinite;
  text-decoration: none;
  transition: color 0.2s;
}

.home-hero__scroll:hover {
  color: rgba(0, 220, 255, 0.7);
}

@keyframes home-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Chapter Grid Section --- */
.home-chapters {
  background: linear-gradient(180deg, #0a0a1a 0%, #0d1225 40%, #0f1630 100%);
  padding: 5rem 2rem 6rem;
  text-align: center;
}

.home-chapters__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: #e0f0ff;
  margin: 0 0 0.5rem;
  text-shadow: 0 0 20px rgba(0, 180, 255, 0.15);
}

.home-chapters__subtitle {
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  color: rgba(180, 210, 240, 0.5);
  margin: 0 0 3rem;
}

.home-chapters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Chapter Cards — Glassmorphism --- */
.home-card {
  position: relative;
  display: block;
  padding: 1.5rem 1.4rem;
  border-radius: 12px;
  background: rgba(15, 25, 50, 0.5);
  border: 1px solid rgba(100, 180, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  text-align: left;
  transition: all 0.3s ease;
  overflow: hidden;
}

.home-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0), transparent);
  transition: background 0.3s ease;
}

.home-card:hover {
  border-color: rgba(0, 200, 255, 0.3);
  background: rgba(20, 35, 70, 0.6);
  transform: translateY(-4px);
  box-shadow:
    0 8px 30px rgba(0, 150, 255, 0.12),
    0 0 1px rgba(0, 200, 255, 0.3);
  text-decoration: none;
}

.home-card:hover::before {
  background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.6), transparent);
}

.home-card__number {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(0, 200, 255, 0.5);
  letter-spacing: 0.08em;
  font-family: "Fira Code", monospace;
  margin-bottom: 0.5rem;
}

.home-card:hover .home-card__number {
  color: rgba(0, 240, 255, 0.8);
}

.home-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #dce8f5;
  margin: 0 0 0.4rem;
  line-height: 1.3;
}

.home-card:hover .home-card__title {
  color: #ffffff;
}

.home-card__desc {
  font-size: 0.78rem;
  color: rgba(180, 200, 225, 0.5);
  margin: 0;
  line-height: 1.5;
}

.home-card:hover .home-card__desc {
  color: rgba(200, 220, 240, 0.7);
}

/* --- Responsive — Homepage --- */
@media screen and (max-width: 60em) {
  .home-hero {
    min-height: 480px;
  }

  .home-chapters {
    padding: 3rem 1rem 4rem;
  }

  .home-chapters__grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.8rem;
  }
}

@media screen and (max-width: 36em) {
  .home-hero__content {
    padding: 0 1rem;
  }

  .home-hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .home-hero__cta {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .home-chapters__grid {
    grid-template-columns: 1fr;
  }
}

/* Fix homepage footer to match dark theme */
.home-page .md-footer {
  background-color: #080c18;
}

.home-page .md-footer-meta {
  background-color: #060a14;
}
