/* Tighten gap between section headings and body text */
.page__content h2 {
  margin-bottom: 0.4rem;
}

.page__title {
  font-family: 'Lora', serif !important;
  font-weight: 400 !important;
}

.page__subtitle {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  color: #999;
  margin-top: -0.5rem;
  margin-bottom: 1.75rem;
  line-height: 1.45;
}

/* Figure and table labels */
.figure-label,
.table-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
}

/* Figure description below label */
.figure-desc {
  font-size: 0.8rem;
  font-style: italic;
  color: #bbb;
  margin-top: 0;
  margin-bottom: 1.75rem;
  line-height: 1.55;
}

/* Collapsible appendix button */
details summary {
  cursor: pointer;
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #555;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  padding: 0.45rem 0.9rem;
  margin-bottom: 1.25rem;
  user-select: none;
  transition: background 0.15s, color 0.15s;
}

details summary:hover {
  background: #f5f5f5;
  color: #222;
}

details[open] summary {
  background: #f5f5f5;
  color: #222;
}

.theme-toggle {
    display: none !important;
  }

.author__interests {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 1rem 0;
}

.author__interest-tag {
  font-size: 0.72rem;
  font-family: 'DM Sans', sans-serif;
  color: #8b2032;
  background-color: #f7eaec;
  border: 1px solid #d9a8af;
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
}

/* Sidebar card box */
.sidebar [itemscope] {
  padding: 1.2rem 1rem;
  height: fit-content;
  align-self: flex-start;
  text-align: center;
}

/* Sidebar positioning — desktop only */
@media (min-width: 1024px) {
  .sidebar.sticky {
    left: 2rem !important;
    width: 260px !important;
    max-width: 260px !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
}


/* Hide footer Follow section */
.page__footer-follow {
  display: none !important;
}

/* Author avatar — traditional oval */
.author__avatar img {
  width: 230px !important;
  height: 230px !important;
  max-width: none !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  display: block;
  margin: 0 auto;
  padding: 0 !important;
  border: none !important;
}

/* Breathing room between photo and name */
.author__avatar {
  margin-bottom: 1.1rem;
}

/* Left-align header and main content to match fixed sidebar coordinate system */
.masthead__inner-wrap {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-right: 2.5rem !important;
}

#main {
  margin-left: 0 !important;
  max-width: 100% !important;
  margin-top: 3.5em !important;
}

/* Simple nav — site title left, links right */
.site-nav--simple .site-nav__links {
  display: flex;
  align-items: center;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav--simple .masthead__menu-item--lg {
  flex: 1;
}

.site-nav--simple .masthead__menu-item a {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  text-transform: lowercase;
}

.site-nav--simple .masthead__menu-item--lg a {
  text-transform: none;
}

/* Active page — red underline */
.site-nav--simple a.active {
  color: #8b2032 !important;
  text-decoration: underline;
  text-decoration-color: #8b2032;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Site title — Lora font, bigger, bold */
.masthead__menu-item--lg a {
  font-family: 'Lora', serif !important;
  font-size: 2.3rem !important;
  font-weight: 700 !important;
  line-height: 1.1;
  padding-left: 1.75rem !important;
}

/* Pronouns under name in header */
.masthead__pronouns {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: #888;
  letter-spacing: 0.03em;
  margin-top: 0.35rem;
  padding-left: 2rem;
}

/* Push name + pronouns down and right */
.masthead__menu-item--lg {
  padding-top: 1.4rem;
  padding-bottom: 0.4rem;
  padding-left: 0.75rem;
}

/* Hide name, bio, pronouns and social links from sidebar */
.author__name,
.author__bio,
.author__pronouns,
.author__urls-wrapper {
  display: none !important;
}

/* Remove header bottom border completely */
.masthead::after {
  display: none !important;
  content: none !important;
}

.masthead {
  border-bottom: none !important;
  box-shadow: none !important;
}

.masthead__inner-wrap {
  border-bottom: none !important;
}

/* Nav link hover */
.site-nav--simple a:hover {
  color: #8b2032 !important;
}

/* Site-wide link hover accent */
.page__content a:hover,
.home-text a:hover {
  color: #8b2032 !important;
  text-decoration-color: #8b2032;
}

/* Footer */
/* Sticky footer */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.masthead {
  flex-shrink: 0;
  width: 100%;
}

.greedy-nav {
  width: 100%;
}

#main {
  flex: 1;
}

.page__footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  background: var(--global-bg-color, #fff) !important;
  z-index: 5;
  margin-top: 0 !important;
}

#main {
  padding-bottom: 2rem;
}

.page__footer-text {
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  color: #aaa;
  padding: 0.2rem 0;
}

.page__footer-text a,
.page__footer-text a:visited {
  color: #aaa;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page__footer-text a:hover {
  color: #8b2032;
}

/* Active nav link */
.greedy-nav a.active {
  border-bottom: 2px solid #8b2032;
  color: #8b2032 !important;
  padding-bottom: 2px;
}

/* CV download button */
.cv-button {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff !important;
  background-color: #8b2032;
  border: 1px solid #8b2032;
  border-radius: 4px;
  padding: 0.35rem 0.85rem;
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s;
}

.home-social-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 2.5rem !important;
}

.home-social-row .cv-button {
  margin-right: 0.6rem;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid #ccc;
  color: #555 !important;
  text-decoration: none !important;
  font-size: 0.85rem;
  transition: border-color 0.15s, color 0.15s;
}

.social-icon-btn:hover {
  border-color: #8b2032;
  color: #8b2032 !important;
}

.cv-button:hover {
  background-color: #6e1828 !important;
  border-color: #6e1828;
  color: #fff !important;
}

/* =====================
   MOBILE STYLES
   ===================== */
@media (max-width: 1023px) {

  /* Header — two-line layout: name row, then nav row below */
  .site-nav--simple .site-nav__links {
    flex-wrap: wrap !important;
  }

  .masthead__menu-item--lg {
    width: 100% !important;
    flex: none !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.1rem !important;
    padding-left: 0 !important;
  }

  .site-nav--simple .masthead__menu-item--lg a {
    font-size: 2.8rem !important;
    padding-left: 0.75rem !important;
    line-height: 1.15 !important;
  }

  /* Hide pronouns on mobile to save space */
  .masthead__pronouns {
    display: none !important;
  }

  .masthead__inner-wrap {
    padding-right: 0.5rem !important;
  }

  /* Nav links sit on second line */
  .site-nav--simple .masthead__menu-item:not(.masthead__menu-item--lg) {
    padding-bottom: 0.4rem !important;
  }

  .site-nav--simple .masthead__menu-item a {
    font-size: 0.95rem !important;
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
  }

  /* First nav link — tighten left indent to align with name */
  .site-nav--simple .masthead__menu-item:not(.masthead__menu-item--lg):first-of-type a {
    padding-left: 0.75rem !important;
  }

  /* About page — stack photo above text, tighter gap */
  .about-layout {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .about-photo img {
    width: 180px !important;
    height: 180px !important;
  }

  .about-content {
    width: 100%;
  }

  /* Bigger social icon buttons on mobile */
  .social-icon-btn {
    width: 2.8rem !important;
    height: 2.8rem !important;
    font-size: 1.1rem !important;
  }

  .home-social-row {
    gap: 0.8rem !important;
    margin-top: 1.5rem !important;
  }

  /* Main content — no extra padding on mobile */
  #main {
    padding-left: 1rem;
    padding-right: 1rem;
    margin-top: 2em !important;
  }
}