:root {
  --brand-deep: #1f2a44;
  --brand-mid: #2a6f97;
  --brand-soft: #eef5fb;
}

.md-header,
.md-tabs {
  background: linear-gradient(120deg, var(--brand-deep), var(--brand-mid));
}

.md-header__button,
.md-header__title,
.md-tabs__link,
.md-nav__button {
  color: #f8fbff !important;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  color: #ffffff !important;
}

/* Force-hide header search UI */
[data-md-component="search"],
.md-search,
.md-header__option:has([data-md-component="search"]) {
  display: none !important;
}

label[for="__search"],
input#__search,
.md-header__button[for="__search"] {
  display: none !important;
}

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

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

.hero {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
  text-align: center;
  padding: 1.25rem;
  border: 1px solid rgba(11, 61, 46, 0.15);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, var(--brand-soft));
}

.hero-name {
  margin: 0;
  color: var(--brand-deep);
}

.md-typeset .hero-name {
  margin: 0 !important;
  line-height: 1.05;
}

.hero-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
}

.hero-lead {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-deep);
}

.hero-copy p {
  margin: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
  max-width: 52rem;
}

.hero-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 61, 46, 0.25);
  text-decoration: none;
  font-weight: 600;
}

.hero-links a[aria-label] {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
}

.social-icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  overflow: visible;
}

.hero-links a:hover {
  background: rgba(20, 107, 84, 0.09);
}

.md-typeset a {
  word-break: break-word;
}

@media (max-width: 800px) {
  .md-typeset {
    font-size: 0.97rem;
  }

  .md-tabs__link {
    padding: 0.8rem 0.75rem;
    font-size: 0.92rem;
  }

  .hero {
    padding: 1rem;
    gap: 0.55rem;
  }

  .md-typeset .hero-name {
    font-size: 1.9rem;
    line-height: 1.1;
  }

  .hero-copy {
    max-width: 100%;
    gap: 0.55rem;
  }

  .hero-copy p {
    line-height: 1.55;
  }

  .hero-links {
    gap: 0.65rem;
  }

  .hero-image {
    width: min(52vw, 220px);
    height: min(52vw, 220px);
    margin: 0 auto;
  }

  .cv-embed {
    display: none;
  }

  .cv-mobile-action {
    display: block;
    text-align: center;
    margin: 0.5rem 0 0;
  }
}

@media (min-width: 801px) {
  .cv-mobile-action {
    display: none;
  }
}

/* Hide the "On this page" sidebar globally */
@media screen and (min-width: 60em) {
  .md-sidebar--primary,
  .md-sidebar--secondary,
  [data-md-component="sidebar"][data-md-type="toc"],
  .md-nav--secondary {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
  }

  .md-main__inner {
    display: block !important;
    max-width: 61rem;
    margin: 1.2rem auto 0 !important;
    padding: 0 0.8rem;
  }
}

@media screen and (min-width: 76.25em) {
  .md-content {
    margin: 0 auto !important;
    max-width: 61rem !important;
  }

  .md-content__inner {
    margin: 0 auto !important;
    max-width: 61rem;
  }
}
