:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #23332f;
  background: #f7f2e8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #23332f;
  --muted: #65756e;
  --green: #2e7668;
  --green-dark: #225d53;
  --green-soft: #e4f0e9;
  --gold: #cf9a55;
  --line: #dce5df;
  --surface: #fffefa;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: #f7f2e8;
  background-image:
    linear-gradient(rgba(250, 247, 239, 0.22), rgba(250, 247, 239, 0.22)),
    url("/images/munozden-back.png");
  background-size: cover, 768px 768px;
  background-repeat: no-repeat, repeat;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header,
main,
.site-footer {
  width: min(1080px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.site-header {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px 10px 10px 4px;
  background: var(--green);
  color: white;
  font-size: 1.2rem;
  line-height: 1;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--green-dark);
}

main {
  min-height: calc(100vh - 170px);
  padding-bottom: 64px;
}

.intro {
  max-width: 760px;
  padding: clamp(62px, 10vw, 112px) 0 62px;
}

.science-intro {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  gap: clamp(24px, 6vw, 72px);
}

.science-intro-copy {
  max-width: 760px;
}

.professor-art {
  width: 160px;
  margin: 0;
  justify-self: end;
}

.professor-art img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(35, 51, 47, 0.12);
  border-radius: 16px;
  box-shadow: 0 14px 38px rgba(43, 69, 58, 0.12);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 8vw, 6.1rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.99;
}

h1 span {
  color: var(--green);
}

.intro > p:last-child,
.science-intro-copy > p:last-child {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.8;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading .eyebrow {
  margin-bottom: 6px;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.subject-grid,
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.subject-card,
.topic-card {
  display: flex;
  min-height: 255px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.9);
  box-shadow: 0 14px 38px rgba(43, 69, 58, 0.05);
}

.subject-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 21px;
}

.subject-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px 13px 13px 5px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.subject-symbol-gold {
  background: #f5efe4;
  color: #836239;
}

.subject-symbol-blue {
  background: #e9f0f3;
  color: #4c7083;
}

.availability {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.65rem;
  font-weight: 750;
}

.availability-soon {
  background: #f4f1e9;
  color: #7b725f;
}

.subject-card h3,
.topic-card h3 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.subject-card p,
.topic-card p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.card-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 750;
}

.card-action {
  color: var(--green-dark);
  text-decoration: none;
}

.card-action span {
  transition: transform 150ms ease;
}

.card-action:hover span {
  transform: translateX(4px);
}

.breadcrumbs {
  padding-top: 25px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 0;
  color: #89968e;
  font-size: 0.78rem;
  list-style: none;
}

.breadcrumbs a {
  color: var(--green-dark);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumbs [aria-current="page"] {
  color: #52635a;
  font-weight: 650;
}

.topic-intro {
  padding-top: 54px;
}

.topic-intro h1 {
  font-size: clamp(3rem, 7vw, 5rem);
}

.topic-section {
  margin-top: 12px;
}

.topic-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}

.topic-card {
  min-height: 224px;
  border-top: 3px solid var(--green);
}

.topic-card .card-action {
  align-self: flex-start;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: #7d8b83;
  font-size: 0.76rem;
}

.site-footer a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid #d39a55;
  outline-offset: 3px;
}

@media (max-width: 800px) {
  .subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .science-intro {
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 24px;
  }

  .professor-art {
    width: 132px;
  }
}

@media (max-width: 540px) {
  .site-header,
  main,
  .site-footer {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 72px;
  }

  .intro {
    padding: 62px 0 42px;
  }

  .science-intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .professor-art {
    width: 96px;
    margin-top: -20px;
  }

  .topic-intro {
    padding-top: 42px;
  }

  .subject-grid {
    grid-template-columns: 1fr;
  }

  .subject-card,
  .topic-card {
    min-height: 220px;
    padding: 21px;
  }

  .site-footer {
    flex-direction: column;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
