:root {
  --max-width: 900px;
  --sidebar-width: 240px;

  --card-max-width: 780px;
  --card-image-width: 160px;
  --card-image-height: 110px;

  --border-color: #ddd;
  --border-color-light: #eee;

  --text-muted: #666;
  --text-secondary: #444;

}

/* ============================================================
   Homepage
   ============================================================ */

.homepage {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, var(--max-width));
  column-gap: 3rem;
  align-items: start;

  max-width: calc(var(--sidebar-width) + var(--max-width) + 3rem);
  margin: 2.5rem auto 0;
}

.homepage-sidebar {
  text-align: left;
}

.homepage-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin-bottom: 1rem;
}

.homepage-name {
  margin: 0 0 0.3rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.homepage-subtitle {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.35;
}

.homepage-socials {
  display: flex;
  flex-direction: row;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: nowrap;
}

.homepage-socials a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.05rem;
  line-height: 1;
}

.homepage-socials a:hover {
  color: var(--bs-link-color);
  text-decoration: none;
}

.homepage-content {
  max-width: var(--max-width);
  font-size: 1.05rem;
  line-height: 1.65;
}

.homepage-content h2 {
  margin-top: 2.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-color-light);
  font-size: 1.45rem;
  font-weight: 700;
}

.homepage-content h2:first-child {
  margin-top: 0;
}

.homepage-content p {
  margin-bottom: 1.25rem;
}


/* ============================================================
   Main content width for other pages
   ============================================================ */

.document {
  max-width: var(--max-width);
  margin: 0 auto;
}


/* ============================================================
   CV / PDF embed
   ============================================================ */

.paper-embed,
.poster-embed,
.cv-embed {
  max-width: 800px;
  height: 75vh;
  min-height: 500px;
  max-height: 900px;
  margin: 1.5rem auto;
}

.poster-embed iframe,
.paper-embed iframe,
.cv-embed iframe {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}


/* ============================================================
   Cards
   ============================================================ */

.paper-cards,
.talk-cards,
.teaching-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.paper-card,
.talk-card,
.teaching-card {
  display: flex;
  align-items: stretch;
  max-width: var(--card-max-width);
  overflow: hidden;

  color: inherit;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-decoration: none;

  transition: box-shadow 0.15s ease;
}

.paper-card:hover,
.talk-card:hover,
.teaching-card:hover {
  color: inherit;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.paper-card img,
.talk-card img,
.teaching-card img {
  width: var(--card-image-width);
  min-width: var(--card-image-width);
  height: var(--card-image-height);
  object-fit: cover;
  display: block;
}

.paper-card-body,
.talk-card-body,
.teaching-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.85rem 1rem;
}

.paper-card-title,
.talk-card-title,
.teaching-card-title {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.paper-card-authors,
.talk-card-event,
.teaching-card-role {
  margin-bottom: 0.2rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.35;
}

.paper-card-meta,
.talk-card-date,
.teaching-card-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}


/* ============================================================
   Paper page hero
   ============================================================ */

.paper-hero {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
}

.paper-hero-text {
  flex: 1;
  min-width: 0;
}

.paper-hero h1 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.paper-thumbnail {
  width: 180px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 0.35rem;
}


/* ============================================================
   Paper header
   ============================================================ */

.paper-header {
  margin-top: -0.5rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.paper-authors {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  line-height: 1.4;
}

.paper-journal {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.4;
}


/* ============================================================
   Responsive layout
   ============================================================ */

@media (max-width: 700px) {
  .paper-hero {
    flex-direction: column;
  }

  .paper-thumbnail {
    width: 160px;
  }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 800px) {
  .homepage {
    display: block;
    margin-top: 1.5rem;
  }

  .homepage-sidebar {
    margin-bottom: 2rem;
  }
}

@media (max-width: 800px){
  .paper-embed,
  .poster-embed,
  .cv-embed {
    height: 65vh;
    min-height: 420px;
  }
}

@media (max-width: 600px) {

  .paper-card,
  .talk-card,
  .teaching-card {
    flex-direction: column;
  }

  .paper-card img,
  .talk-card img,
  .teaching-card img {
    width: 100%;
    min-width: 100%;
    height: 180px;
  }
}

:root {
  --link-color: #2f6f9f;        /* muted academic blue */
  --link-hover-color: #1f4e75;  /* darker blue on hover */

  /* Override Bootstrap / Quarto link variables */
  --bs-link-color: var(--link-color);
  --bs-link-hover-color: var(--link-hover-color);
}

/* Main text links */
a {
  color: var(--link-color);
  text-decoration-color: color-mix(in srgb, var(--link-color) 55%, transparent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration-color: var(--link-hover-color);
}

.single-spaced-refs {
  line-height: 1.1;
  font-size: 0.95em;
}

.single-spaced-refs p {
  margin-bottom: 0.35em;
}

/* All navbar links, site name, and search icon */
.navbar-nav .nav-link,
.navbar-brand,
#quarto-search,
#quarto-search .bi,
.quarto-search-button {
  color: #fff !important;
}

/* Hover and keyboard focus */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-brand:hover,
.navbar-brand:focus,
#quarto-search:hover,
#quarto-search:focus,
#quarto-search:hover .bi,
#quarto-search:focus .bi,
.quarto-search-button:hover,
.quarto-search-button:focus {
  color: var(--text-muted) !important;
}

/* Keep the active menu item white */
.navbar #quarto-search:hover svg,
.navbar #quarto-search:focus svg {
  fill: var(--text-muted) !important;
  color: var(--text-muted) !important;
}