/* --------------------------------------------------
   Global typography and spacing
-------------------------------------------------- */

body {
  font-size: 1.03rem;
  line-height: 1.68;
}

main {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

p {
  margin-bottom: 1rem;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  font-weight: 600;
}

h1 {
  margin-bottom: 1.2rem;
}

h2 {
  margin-top: 2.3rem;
  margin-bottom: 0.9rem;
}

h3 {
  margin-top: 1.7rem;
  margin-bottom: 0.7rem;
}

.navbar {
  font-size: 0.95rem;
}

.navbar-brand {
  font-weight: 700;
  margin-right: 2rem;
}

.navbar-nav .nav-link {
  font-weight: 500;
}

a {
  text-underline-offset: 3px;
}


/* Navigation */

.navbar-title {
  font-weight: 600;
}

.navbar-nav .nav-link {
  font-weight: 500;
}

.navbar-brand {
    font-weight: 700;
    margin-right: 2rem;
}

/* Links */

a {
  text-underline-offset: 3px;
}

/* Buttons */

.btn {
  border-radius: 4px;
  padding: 0.55rem 1rem;
}

/* Research listings */

.quarto-listing {
  margin-top: 2rem;
}

.quarto-listing .listing-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.quarto-listing .listing-description {
  line-height: 1.55;
}

/* Footer */

.nav-footer {
  margin-top: 4rem;
  font-size: 0.9rem;
}


/* Use the body font for page titles and headings */

/* Standard page titles */
.quarto-title h1,
h2,
h3,
h4,
h5,
h6  {
  font-family: Georgia, "Times New Roman", Times, serif;
}

/* Keep custom homepage name sans-serif */
/* .home-intro h1,
h2,
h3,
h4,
h5,
h6  {
  font-family: var(--bs-body-font-family);
} */

/* Keep navbar sans-serif */
.navbar,
.navbar-brand {
  font-family: var(--bs-body-font-family);
}
/* --------------------------------------------------
   Research cards
-------------------------------------------------- */

.paper-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.paper-card {
  padding: 1.6rem 1.7rem;
  border: 1px solid rgba(0, 0, 0, 0.11);
  border-radius: 8px;
  background: var(--bs-body-bg);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.paper-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
}

.paper-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.paper-status {
  display: inline-block;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.09);
  color: var(--bs-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.paper-title {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
}

.paper-title a {
  color: var(--bs-heading-color);
  text-decoration: none;
}

.paper-title a:hover {
  color: var(--bs-primary);
}

.paper-description {
  max-width: 820px;
  margin: 0.9rem 0 1rem;
  color: var(--bs-body-color);
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.paper-button {
  padding: 0.36rem 0.72rem;
  border: 1px solid var(--bs-primary);
  border-radius: 4px;
  color: var(--bs-primary);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.paper-button:hover,
.paper-button-primary {
  color: white;
  background: var(--bs-primary);
}

.paper-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.paper-topic {
  padding: 0.16rem 0.5rem;
  border-radius: 3px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}

/* --------------------------------------------------
   Individual paper pages
-------------------------------------------------- */

.paper-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.5rem 0 2rem;
}

.paper-page-links p {
  display: contents;
}

.quarto-title-meta {
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------
   Mobile adjustments
-------------------------------------------------- */

@media (max-width: 576px) {
  .paper-card {
    padding: 1.25rem;
  }

  .paper-card-header {
    align-items: flex-start;
  }

  .paper-title {
    font-size: 1.2rem;
  }

  .paper-links {
    gap: 0.45rem;
  }

  .paper-button {
    padding: 0.36rem 0.65rem;
  }
}




/* --------------------------------------------------
   Teaching cards
-------------------------------------------------- */

.course-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.course-card {
  padding: 1.5rem 1.65rem;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 7px;
  background: var(--bs-body-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.035);
}

.course-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.course-institution {
  color: var(--bs-secondary-color);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-term {
  color: var(--bs-secondary-color);
  font-size: 0.88rem;
}

.course-title {
  margin: 0 0 0.35rem;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.35;
}

.course-title a {
  color: var(--bs-heading-color);
  text-decoration: none;
}

.course-title a:hover {
  color: var(--bs-primary);
}

.course-role {
  margin: 0 0 0.65rem;
  color: var(--bs-secondary-color);
  font-size: 0.93rem;
}

.course-description {
  margin: 0 0 0.9rem;
  line-height: 1.55;
}

.course-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
  margin-top: 0.8rem;
}

.course-links a {
  color: var(--bs-primary);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.course-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------
   Individual course pages
-------------------------------------------------- */

.course-meta {
  margin: -0.55rem 0 1.75rem;
  color: var(--bs-secondary-color);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Topic tags on individual course pages */

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1.75rem;
}

.topic-tags span {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: 4px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-size: 0.88rem;
  line-height: 1.3;
}

.materials-note {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
  font-style: italic;
}

/* Lighter section separation on course pages */

.course-meta + h2,
.topic-tags + h2 {
  margin-top: 2rem;
}

@media (max-width: 576px) {
  .topic-tags {
    gap: 0.4rem;
  }

  .topic-tags span {
    padding: 0.24rem 0.55rem;
    font-size: 0.82rem;
  }
}



/* --------------------------------------------------
   Homepage
-------------------------------------------------- */

body.home main {
  max-width: 1080px;
}

body.home h1 {
  max-width: 980px;
  margin: 2.25rem auto 1.75rem;
  padding: 0 1.5rem;
  font-size: 2.35rem;
  font-weight: 650;
  line-height: 1.1;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 720px) 180px;
  justify-content: center;
  align-items: start;
  gap: 2rem;
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.home-intro {
  width: 100%;
  max-width: 720px;
}

.home-intro p {
  max-width: 680px;
  margin: 0 0 1.35rem;
  font-size: 1.08rem;
  line-height: 1.68;
}

.home-intro p:first-child {
  font-size: 1.12rem;
}

.home-photo {
  align-self: start;
  margin-top: -0.4rem;
  padding: 0.15rem 0 0;
}

.home-photo p {
  margin: 0;
}

.home-photo img {
  display: block;
  width: 180px;
  height: auto;
  margin: 0;
  border-radius: 6px;
  object-fit: cover;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.45rem;
  margin-top: 1.55rem;
}

.home-links a {
  color: var(--bs-secondary-color);
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.home-links a:hover {
  color: var(--bs-primary);
}

.home-links i {
  margin-right: 0.35rem;
}

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

  .home-photo {
    grid-row: 1;
  }

  .home-photo img {
    width: 130px;
  }

  body.home h1 {
    max-width: 720px;
  }
}