@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=JetBrains+Mono:wght@400;600&display=swap");

:root {
  --course-display-font: "Space Grotesk", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --course-body-font: "Roboto", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --course-code-font: "JetBrains Mono", "Roboto Mono", "Consolas", monospace;
  --course-brand-ink: #0b1f33;
  --course-brand-ink-soft: #173552;
  --course-brand-cyan: #14b8a6;
  --course-brand-sky: #38bdf8;
  --course-brand-orange: #fb923c;
  --course-brand-line: rgba(11, 31, 51, 0.1);
  --course-surface: #f4f8fc;
  --course-surface-strong: #ffffff;
  --course-panel-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  --course-panel-radius: 28px;
  --course-panel-radius-md: 22px;
  --md-primary-fg-color: #0b1f33;
  --md-primary-fg-color--light: #173552;
  --md-primary-fg-color--dark: #07111c;
  --md-accent-fg-color: #0f9e94;
  --md-typeset-a-color: #0f9e94;
}

[data-md-color-scheme="slate"] {
  --course-brand-ink: #e5f4ff;
  --course-brand-ink-soft: #bfd6e8;
  --course-brand-line: rgba(148, 163, 184, 0.18);
  --course-surface: #08131d;
  --course-surface-strong: #0f1c28;
  --course-panel-shadow: 0 28px 64px rgba(2, 6, 23, 0.42);
  --md-primary-fg-color: #08131d;
  --md-primary-fg-color--light: #0f1c28;
  --md-primary-fg-color--dark: #050b11;
  --md-accent-fg-color: #2dd4bf;
  --md-typeset-a-color: #5eead4;
}

body {
  font-family: var(--course-body-font);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 25%),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.08), transparent 22%),
    var(--course-surface);
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-header__title,
.md-tabs__link,
.course-footer h2,
.course-footer h3 {
  font-family: var(--course-display-font);
  letter-spacing: -0.02em;
}

code,
kbd,
pre,
.md-typeset code {
  font-family: var(--course-code-font);
}

.md-header {
  background:
    linear-gradient(135deg, rgba(11, 31, 51, 0.97), rgba(22, 58, 90, 0.94));
  box-shadow: 0 14px 34px rgba(2, 8, 23, 0.18);
}

.md-header__inner {
  min-height: 4.25rem;
  padding-inline: 0.7rem;
  gap: 0.7rem;
}

.md-header__button.md-logo {
  margin: 0.2rem 0.5rem 0.2rem 0;
  padding: 0.22rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  display: block;
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  object-fit: cover;
}

.md-header__title {
  font-weight: 700;
}

.md-header__topic:first-child,
.md-header__topic + .md-header__topic {
  font-weight: 700;
}

.md-search__form {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.md-tabs {
  background: rgba(8, 19, 29, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.md-tabs__list {
  gap: 1rem;
}

.md-tabs__item {
  height: auto;
}

.md-tabs__link {
  margin-top: 0;
  padding: 0.95rem 0.1rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.72;
}

.md-tabs__link:is(:hover, :focus),
.md-tabs__link--active {
  color: #fff;
  opacity: 1;
}

.md-main__inner {
  margin-top: 0.8rem;
}

.md-content {
  padding-bottom: 2rem;
}

.md-typeset a:is(:hover, :focus) {
  color: var(--course-brand-orange);
}

.md-footer__inner,
.md-footer-meta {
  background: transparent;
}

.md-footer {
  margin-top: 2rem;
}

.md-footer-nav {
  background:
    linear-gradient(135deg, rgba(11, 31, 51, 0.96), rgba(20, 39, 60, 0.94));
}

.md-footer-nav__link {
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

.course-footer {
  margin-top: 0;
  padding: 2.3rem 0 1.2rem;
  color: rgba(255, 255, 255, 0.88);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 28%),
    linear-gradient(180deg, #08131d, #0d1f2e);
}

.course-footer__inner,
.course-footer__links {
  display: grid;
  gap: 1.5rem;
}

.course-footer__inner {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
}

.course-footer__brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.course-footer__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.3rem;
  height: 4.3rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.course-footer__logo img {
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 16px;
  object-fit: cover;
}

.course-footer__eyebrow {
  margin: 0 0 0.35rem;
  color: rgba(148, 229, 224, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-footer h2,
.course-footer h3 {
  margin: 0;
  color: #fff;
}

.course-footer__brand p:last-child {
  max-width: 38rem;
  margin: 0.6rem 0 0;
  color: rgba(226, 232, 240, 0.78);
}

.course-footer__links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-footer__links div {
  display: grid;
  gap: 0.55rem;
}

.course-footer__links a {
  color: rgba(226, 232, 240, 0.76);
}

.course-footer__links a:is(:hover, :focus) {
  color: #fff;
}

.course-footer__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: rgba(191, 214, 232, 0.72);
  font-size: 0.8rem;
}

.course-footer__meta p {
  margin: 0;
}

.course-footer__record {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.course-footer__record img {
  width: 1.05rem;
  height: 1.05rem;
  object-fit: contain;
}

.home-shell {
  position: relative;
  padding: 1.4rem 0 0;
}

.home-shell__inner {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 1rem;
}

.home-hero,
.home-panel,
.home-info-card,
.module-card,
.path-card,
.highlight-card,
.update-card {
  border: 1px solid var(--course-brand-line);
  border-radius: var(--course-panel-radius);
  box-shadow: var(--course-panel-shadow);
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 2.4rem;
  color: #f8fafc;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.28), transparent 30%),
    radial-gradient(circle at 14% 18%, rgba(20, 184, 166, 0.22), transparent 26%),
    linear-gradient(135deg, #08131d, #13324a 68%, #115e59 140%);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: auto auto -9rem -5rem;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  filter: blur(16px);
}

.home-hero__grid,
.home-strip,
.module-grid,
.path-grid,
.highlight-grid,
.update-grid,
.home-dual,
.home-stats {
  display: grid;
  gap: 1rem;
}

.home-hero__grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(21rem, 0.85fr);
  align-items: center;
  gap: 1.5rem;
}

.home-eyebrow,
.home-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-eyebrow {
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.1);
}

.home-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.02;
}

.home-lead {
  max-width: 44rem;
  margin: 1rem 0 0;
  color: rgba(241, 245, 249, 0.86);
  font-size: 1.08rem;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.55rem;
}

.home-actions .md-button {
  margin: 0;
  border-radius: 999px;
}

.home-actions .md-button:not(.md-button--primary) {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.home-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.9rem;
}

.home-stat {
  position: relative;
  z-index: 1;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.home-stat strong {
  display: block;
  color: #fff;
  font-size: 1.5rem;
}

.home-stat span {
  display: block;
  margin-top: 0.35rem;
  color: rgba(241, 245, 249, 0.74);
  font-size: 0.81rem;
}

.home-hero__visual {
  position: relative;
  min-height: 100%;
}

.home-visual-card {
  position: relative;
  padding: 1rem;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.home-visual-card img {
  display: block;
  width: 100%;
  height: auto;
}

.home-hero__badge {
  position: absolute;
  display: grid;
  gap: 0.2rem;
  max-width: 12rem;
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  background: rgba(7, 16, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.2);
}

.home-hero__badge span {
  color: rgba(148, 229, 224, 0.86);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-hero__badge strong {
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.3;
}

.home-hero__badge--top {
  top: 1rem;
  left: -1.2rem;
}

.home-hero__badge--bottom {
  right: -0.7rem;
  bottom: 1.2rem;
}

.home-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-info-card,
.home-panel,
.highlight-card,
.update-card {
  padding: 1.45rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 253, 0.94));
}

[data-md-color-scheme="slate"] .home-info-card,
[data-md-color-scheme="slate"] .home-panel,
[data-md-color-scheme="slate"] .highlight-card,
[data-md-color-scheme="slate"] .update-card,
[data-md-color-scheme="slate"] .module-card,
[data-md-color-scheme="slate"] .path-card {
  background: linear-gradient(180deg, rgba(15, 28, 40, 0.96), rgba(8, 19, 29, 0.96));
}

.home-info-card h2,
.home-panel h2 {
  margin: 0;
}

.home-info-card p,
.home-panel p,
.module-card p,
.path-card p,
.highlight-card p,
.update-card p {
  color: var(--md-default-fg-color--light);
}

.home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.home-section-head p:last-child {
  max-width: 33rem;
  margin: 0;
}

.home-section-kicker {
  color: var(--md-accent-fg-color);
}

.module-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.path-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.highlight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.update-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-dual {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.module-card,
.path-card {
  display: block;
  height: 100%;
  padding: 1.35rem;
  color: inherit;
  text-decoration: none;
  background: var(--course-surface-strong);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.module-card:hover,
.path-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.42);
  box-shadow: 0 26px 56px rgba(15, 23, 42, 0.16);
}

.module-tag,
.update-meta {
  display: inline-flex;
  margin-bottom: 0.8rem;
  color: var(--md-accent-fg-color);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.path-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-bottom: 0.9rem;
  border-radius: 999px;
  color: #fff;
  font-family: var(--course-display-font);
  font-weight: 700;
  background: linear-gradient(135deg, var(--course-brand-orange), #f97316);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.76rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: var(--md-accent-fg-color);
  font-size: 0.8rem;
  font-weight: 700;
}

.home-panel--compact .home-section-head {
  margin-bottom: 1rem;
}

.home-panel--cta {
  background:
    radial-gradient(circle at left top, rgba(34, 211, 238, 0.14), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 254, 255, 0.95));
}

[data-md-color-scheme="slate"] .home-panel--cta {
  background:
    radial-gradient(circle at left top, rgba(45, 212, 191, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(9, 22, 31, 0.98), rgba(11, 44, 44, 0.98));
}

@media screen and (max-width: 1220px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-strip,
  .path-grid,
  .highlight-grid,
  .update-grid,
  .course-footer__inner,
  .home-dual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-footer__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 900px) {
  .md-header__inner {
    min-height: 3.8rem;
  }

  .home-hero {
    padding: 1.45rem;
  }

  .home-hero__grid,
  .home-strip,
  .path-grid,
  .highlight-grid,
  .update-grid,
  .course-footer__inner,
  .course-footer__links,
  .home-dual {
    grid-template-columns: 1fr;
  }

  .home-section-head,
  .course-footer__meta {
    display: grid;
  }

  .home-hero__badge {
    position: static;
    max-width: none;
    margin-top: 0.8rem;
  }
}

@media screen and (max-width: 700px) {
  .md-tabs__list {
    gap: 0.7rem;
  }

  .md-tabs__link {
    padding-block: 0.8rem 0.9rem;
    font-size: 0.72rem;
  }

  .home-shell {
    padding-top: 1rem;
  }

  .home-hero,
  .home-panel,
  .home-info-card,
  .module-card,
  .path-card,
  .highlight-card,
  .update-card {
    padding: 1.08rem;
    border-radius: 22px;
  }

  .home-hero h1 {
    font-size: 2.2rem;
  }

  .home-stats,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .home-actions {
    flex-direction: column;
  }

  .home-actions .md-button {
    width: 100%;
    text-align: center;
  }

  .course-footer {
    padding-top: 1.8rem;
  }

  .course-footer__brand {
    grid-template-columns: 1fr;
  }
}
