:root{
  /* Primary red gradient */
  --purple-1:#dc2626;   /* rich red */
  --purple-2:#f43f5e;   /* soft rose red */

  /* Dark-mode reds */
  --purple-d1:#7f1d1d;  /* deep dark red */
  --purple-d2:#991b1b;  /* warm dark red */

  /* Accent text red */
  --purple-ink:#b91c1c;

  --md-header-height: 3.2rem;
}

/* HEADER & TABS */
.md-header,
.md-tabs{
  background: linear-gradient(90deg, var(--purple-1), var(--purple-2)) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12) !important;
}

[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-tabs{
  background: linear-gradient(90deg, var(--purple-d1), var(--purple-d2)) !important;
  box-shadow: 0 2px 14px rgba(0,0,0,0.35) !important;
}

.md-header__inner,
.md-tabs__inner{
  background: transparent !important;
}

.md-header .md-header__button,
.md-header .md-header__button *,
.md-search__form,
.md-search__input,
.md-search__icon,
.md-header__option{
  background-color: transparent !important;
  color:#fff !important;
}

.md-tabs__link:hover{
  background-color: rgba(255,255,255,0.12) !important;
}

/* CONTENT WIDTH */
.md-content__inner{
  max-width: 900px !important;
}
@media (min-width: 1200px){
  .md-content__inner{
    max-width: 1000px !important;
  }
}

/* HEADINGS */
.md-typeset h1{
  font-weight: 900 !important;
  letter-spacing: -0.3px;
}
.md-typeset h2{
  margin-top: 2.2rem !important;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(220,38,38,0.25);
}
.md-typeset h3{
  font-weight: 700 !important;
  color: var(--purple-ink);
}

/* NAV PRIMARY */
.md-nav--primary .md-nav__item--section > .md-nav__title,
.md-nav--primary .md-nav__item--section > .md-nav__link,
.md-nav--primary .md-nav__item--nested > .md-nav__link{
  display:flex !important;
  align-items:center !important;
  margin: 8px !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  background: linear-gradient(90deg, var(--purple-1), var(--purple-2)) !important;
  color: #fff !important;
  font-weight: 800 !important;
}

/* FOOTER */
.md-footer{
  background: transparent !important;
}

[data-md-color-scheme="default"] .custom-footer,
[data-md-color-scheme="default"] .md-footer-meta{
  background: linear-gradient(90deg, var(--purple-1), var(--purple-2)) !important;
  color: #fff !important;
}

[data-md-color-scheme="slate"] .custom-footer,
[data-md-color-scheme="slate"] .md-footer-meta{
  background: linear-gradient(90deg, var(--purple-d1), var(--purple-d2)) !important;
  color: #fff !important;
}

/* Make footer more compact */
.custom-footer{
  padding: 26px 16px !important;   /* was much bigger */
  border-top: 1px solid rgba(255,255,255,0.16) !important;
}

.custom-footer__inner{
  max-width: 1200px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 1.2fr 1fr !important;
  gap: 18px !important;            /* tighter */
  align-items: start !important;
}

.custom-footer__right{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(170px, 1fr)) !important;
  gap: 14px !important;            /* tighter */
  align-items: start !important;
}

/* Bigger brand line */
.custom-footer__brand{
  font-weight: 800 !important;
  font-size: 1.1rem !important;
  opacity: .95 !important;
  margin-bottom: 4px !important;
}

/* Bigger title */
.custom-footer__title{
  font-size: 2.2rem !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  margin: 0 0 12px 0 !important;
  letter-spacing: -0.3px !important;
}

/* Fix huge line-heights that made footer tall */
.custom-footer__subtitle{
  opacity: .92 !important;
  line-height: 1.4 !important;
  margin-bottom: 10px !important;
  max-width: 56ch !important;
}

.footer-col__title{
  font-weight: 900 !important;
  margin-bottom: 6px !important;
  opacity: .95 !important;
  line-height: 1.2 !important;
}

.custom-footer__note{
  margin-top: 8px !important;
  font-size: .9rem !important;
  line-height: 1.4 !important;
  opacity: .9 !important;
  max-width: 520px !important;
}

/* FORM */
.custom-footer__form{
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  max-width: 520px !important;
  padding: 8px 10px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.18) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
}

.custom-footer__input{
  flex: 1 !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: #fff !important;
  padding: 8px 10px !important;
  font-size: 1rem !important;
}

.custom-footer__button{
  border: 0 !important;
  cursor: pointer !important;
  border-radius: 999px !important;
  padding: 8px 14px !important;
  font-weight: 900 !important;
  background: rgba(255,255,255,0.92) !important;
  color: #1f2937 !important;
}

/* LINKS */
.footer-link{
  display: block !important;
  padding: 4px 0 !important;
  line-height: 1.5 !important;
  text-decoration: none !important;
  color: rgba(255,255,255,0.90) !important;
}

.footer-link:hover{
  color: #fff !important;
  text-decoration: underline !important;
}

.md-footer-meta__inner,
.md-footer-meta__inner a{
  color: rgba(255,255,255,0.90) !important;
}

/* TABLE OF CONTENTS: red gradient underline */
.md-nav--secondary .md-nav__title{
  position: relative !important;
  padding-bottom: 10px !important;
}

.md-nav--secondary .md-nav__title::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-1), var(--purple-2));
}

/* LOGO SIZE */
.md-header__button.md-logo img{
  height: auto !important;
  max-height: calc(var(--md-header-height) - 0.6rem) !important;
  width: auto !important;
}

/* =========================
   CS316 HOME PAGE FIXES
   (hero + cards + icon sizing)
   ========================= */

/* Hero container */
.home-hero{
  display:grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 22px;
  align-items:center;
  padding: 26px 22px;
  border-radius: 18px;
  border: 1px solid rgba(220,38,38,0.18);
  background: linear-gradient(135deg, rgba(220,38,38,0.08), rgba(244,63,94,0.06));
  margin-top: 6px;
}

@media (max-width: 900px){
  .home-hero{ grid-template-columns: 1fr; }
}

.home-hero__text h1{
  margin: 0 0 10px 0 !important;
}

.home-hero__text p{
  font-size: 1.03rem;
  line-height: 1.7;
  margin: 0 0 14px 0;
  opacity: .95;
}

/* Buttons */
.home-hero .md-button{
  border-radius: 999px !important;
  padding: 10px 16px !important;
  font-weight: 900 !important;
}

.home-hero .md-button--primary{
  background: linear-gradient(90deg, var(--purple-1), var(--purple-2)) !important;
  border: 0 !important;
  color: #fff !important;
}

/* Make Material “grid cards” look tighter + more premium */
.md-typeset .grid.cards > ul{
  gap: 16px !important;
}

.md-typeset .grid.cards > ul > li{
  border-radius: 16px !important;
  border: 1px solid rgba(220,38,38,0.12) !important;
  box-shadow: 0 10px 28px rgba(15,23,42,0.06) !important;
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li{
  border: 1px solid rgba(244,63,94,0.18) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,0.35) !important;
}

/* Fix icon appearance inside card titles (emoji SVG size) */
.md-typeset .grid.cards strong .twemoji,
.md-typeset .grid.cards strong .twemoji svg{
  width: 1.25em !important;
  height: 1.25em !important;
  vertical-align: -0.2em !important;
}

/* Optional: highlight card title line slightly */
.md-typeset .grid.cards > ul > li > p:first-child{
  font-weight: 900 !important;
}
