:root {
  --accent: rgb(200, 78, 0);   /* burnt orange */
  --accent-text: rgb(89, 89, 89);
  --ink: #222;
  --ink-soft: #2f3f3f;
  --muted: #6f777d;
  --rule: #e6e8ea;
  --site-width: 1024px;
}

/* ============ Typography ============ */
body, .navbar, h1, h2, h3, h4, h5, h6, .navbar-brand, .nav-link {
  font-family: Georgia, "Times New Roman", serif;
}

/* ============ Page frame: 1024px column ============ */
body {
  background: #fff;
  color: var(--ink-soft);
}

.navbar > .container-fluid,
#quarto-content.page-columns {
  max-width: var(--site-width);
  margin-left: auto;
  margin-right: auto;
}

/* ============ Masthead ============ */
.navbar {
  background: #fff !important;
  box-shadow: none;
  border-bottom: 0;
  padding: 1.1em 1em;
}

.navbar .navbar-nav .nav-item:first-child .nav-link { padding-left: 0 !important; }

.navbar .nav-link {
  font-size: 1.05rem;
  color: var(--muted) !important;
  padding: 0.25rem 0.9rem !important;
  border-bottom: .12em solid transparent;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--ink) !important;
  border-bottom-color: var(--accent);
}

.navbar-toggler { border: 0; }

/* ============ Author card (sidebar) ============ */
#quarto-sidebar {
  background: transparent;
  padding-top: 0.5rem;
}

.sidebar.floating #quarto-sidebar,
#quarto-sidebar.floating {
  border: 0;
}

.author-card { padding: 0.25rem 0 0.75rem 0.25rem; }

.author-avatar {
  display: block;
  width: 180px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 0 0.9rem;
}

.author-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.author-bio {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}

/* link list: icon + label, small, like author__urls */
#quarto-sidebar .sidebar-menu-container { padding-left: 0.25rem; }

#quarto-sidebar .sidebar-item {
  margin-bottom: 0.45rem;
}

#quarto-sidebar .sidebar-item-container a {
  font-size: 0.85rem;
  color: var(--ink-soft) !important;
  border-bottom: 0;
}

#quarto-sidebar .sidebar-item-container a .bi {
  color: var(--ink);
  margin-right: 0.35rem;
}

#quarto-sidebar .sidebar-item-container a:hover span,
#quarto-sidebar .sidebar-item-container a.active span {
  border-bottom: .1em solid var(--accent);
}

#quarto-sidebar .sidebar-item-container a.active { font-weight: 400; }

/* ============ Body text & links ============ */
.content p a,
.content ul a,
.content ol a,
.content dd a {
  color: var(--ink);
  border-bottom: .1em solid var(--accent);
  text-decoration: none;
}

.content p a:hover,
.content ul a:hover,
.content ol a:hover,
.content dd a:hover {
  color: var(--accent-text);
}

.content h1, .content h2, .content h3 {
  color: var(--ink);
  font-weight: 700;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  opacity: 1;
  margin: 1.8rem 0;
}

/* ============ Home ============ */
h1.home-title {
  font-size: 1.85rem;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  border: 0;
  padding: 0;
}

.home-body p, .home-updates li {
  line-height: 1.55;
}

h2.home-h2 {
  font-size: 1.2rem;
  margin: 1.8rem 0 0.8rem;
  border: 0;
  padding: 0;
}

.content a.home-research-all {
  display: inline-block;
  font-weight: 500;
  margin-top: 0.25rem;
}

.home-updates-section ul {
  list-style: none;
  padding-left: 1.1rem;
}

.home-updates-section li {
  position: relative;
  margin-bottom: 0.7rem;
}

.home-updates-section li::before {
  content: "\2013";
  position: absolute;
  left: -1.1rem;
  color: var(--muted);
}

/* ============ Research (CSL bibliography list) ============ */
.content h1 { font-size: 1.85rem; }
.content h2 { font-size: 1.2rem; }

.content ul li { margin-bottom: 0.6rem; }

.content li a .fas,
.content li a .fa-solid,
.content li a .ai { margin-right: 0.15em; }

/* ============ CV ============ */
.cv-page { line-height: 1.55; }

h1.cv-title {
  font-size: 1.85rem;
  line-height: 1.15;
  margin: 0 0 1.4rem;
  border: 0;
  padding: 0;
}

.cv-summary p { margin: 0 0 1rem; }

.cv-download-wrap {
  text-align: center;
  margin: 1.6rem 0 2rem;
}

.content .cv-download-wrap a.cv-download,
.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-radius: 3px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.content .cv-download-wrap a.cv-download:hover,
.cv-download:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* CV Preview */
.content a.cv-preview,
.cv-preview {
  display: block;
  position: relative;
  width: min(100%, 28rem);
  margin: 0 auto 2.2rem;
  border: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px -12px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cv-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.cv-preview-hint {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.82rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.content a.cv-preview:hover,
.cv-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 20px 40px -14px rgba(0, 0, 0, 0.3);
}

.cv-preview:hover .cv-preview-hint,
.cv-preview:focus-visible .cv-preview-hint { opacity: 1; }

h2.cv-h2 {
  font-size: 1.15rem;
  margin: 1.8rem 0 0.6rem;
  padding: 0;
  border: 0;
}

.cv-career { margin: 0; }

.cv-career-row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.4rem 1.3rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}

.cv-career-row:last-child { border-bottom: 1px solid var(--rule); }

.cv-career dt {
  color: #526464;
  font-size: 0.85rem;
  font-weight: 400;
  padding-top: 0.12rem;
}

.cv-career dd {
  margin: 0;
  font-size: 0.92rem;
}

.cv-career strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.cv-notes {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ============ Footer ============ */
.nav-footer {
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}

.nav-footer a {
  color: var(--ink);
  border-bottom: .1em solid var(--accent);
  text-decoration: none;
}

/* ============ Small screens ============ */
@media (max-width: 640px) {
  .cv-career-row { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .author-avatar { width: 120px; }
}

.nav-footer .nav-footer-right { padding: 0 1em; }

.nav-footer > .container-fluid,
.nav-footer .footer-contents {
  max-width: var(--site-width);
  margin-left: auto;
  margin-right: auto;
}

/* ============ Layout breakpoints ============ */

.author-card-mobile { display: none; }

/* Masthead never collapses */
.navbar .navbar-toggler,
.navbar .quarto-navbar-tools { display: none !important; }

.navbar .navbar-collapse {
  display: flex !important;
  flex-basis: auto;
}

.navbar > .container-fluid { justify-content: flex-start; }

@media (max-width: 991.98px) {
  /* nav links in a row (Bootstrap stacks them below lg) */
  .navbar .navbar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .navbar .navbar-collapse { flex-wrap: wrap; align-items: center; }
  .navbar > .container-fluid { flex-wrap: wrap; justify-content: flex-start; }

  .navbar { padding: 0.8em 0.25em; }
  .navbar .nav-link { font-size: 1rem; padding: 0.25rem 0.6rem !important; }

  /* Quarto's off-canvas drawer machinery is never used at any width. */
  .quarto-sidebar-toggle,
  .quarto-secondary-nav,
  #quarto-sidebar-glass { display: none !important; }
}

/* ============ Mid-width (720px - 991px): keep the sidebar, simpler grid ============ */
@media (min-width: 720px) and (max-width: 991.98px) {
  body.floating #quarto-content.page-columns {
    display: grid;
    grid-template-columns: [page-start] 200px [body-start] minmax(0, 1fr) [page-end];
    column-gap: 2rem;
    padding: 0 1rem;
  }

  /* Bootstrap's .collapse:not(.show) hides it; override and put it in column 1. */
  body.floating #quarto-sidebar.sidebar-navigation {
    display: flex !important;
    flex-direction: column;
    grid-column: page-start / body-start;
    grid-row: 1;
    position: sticky;
    top: 0;
    align-self: start;
    width: auto;
    height: auto;
    max-height: 100vh;
    margin: 0;
    padding-top: 1rem;
  }

  body.floating #quarto-content.page-columns main.content {
    grid-column: body-start / page-end;
    grid-row: 1;
  }

  .author-avatar { width: 150px; }
}

@media (max-width: 719.98px) {
  /* Quarto's sidebar drawer is replaced by the inline card. */
  #quarto-sidebar,
  .sidebar-navigation.collapse { display: none !important; }

  .author-card-mobile {
    display: block;
    padding: 0.25rem 0 1.1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--rule);
  }

  .author-card-mobile-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.7rem;
  }

  .author-avatar-sm {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 50%;
    object-fit: cover;
  }

  .author-card-mobile .author-name { margin-bottom: 0.15rem; }
  .author-card-mobile .author-bio { margin: 0; }

  .author-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
    font-size: 0.85rem;
  }

  .author-links a {
    color: var(--ink-soft);
    text-decoration: none;
    border-bottom: .1em solid var(--accent);
  }

  .author-links .bi { color: var(--ink); margin-right: 0.25rem; }

  /* content column uses the full width with a comfortable gutter */
  #quarto-content.page-columns { padding: 0 1rem; }
  main.content { padding-top: 0.5rem; }
  h1.home-title, h1.cv-title { font-size: 1.6rem; }
}
