/* ------------------------------------------------------------------
   Site-wide settings — the values you are most likely to change
   ------------------------------------------------------------------ */
:root {
  --background: #ffffff;
  --color: #000000;
  --menu-color: #000000;
  --border-color: rgba(0, 0, 0, 0.12);

  --page-width: 860px;    /* maximum width of the page on large screens */
  --nav-height: 52px;     /* height of the floating navigation bar */
  --headshot-width: 170px;
}

body {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  letter-spacing: normal;
}

/* ------------------------------------------------------------------
   Page width — wide screens get --page-width, phones get the full
   screen with small side margins
   ------------------------------------------------------------------ */
.container {
  max-width: var(--page-width);
  width: 100%;
  box-sizing: border-box;
  padding: 0 40px 40px;
  border: none;
}

@media (max-width: 684px) {
  .container {
    padding: 0 16px 32px;
  }
  body {
    font-size: 0.9rem;
  }
}

/* Keep long links and code from pushing the page sideways on phones */
.index-content {
  overflow-wrap: break-word;
}

/* ------------------------------------------------------------------
   Floating navigation bar
   ------------------------------------------------------------------ */
html {
  scroll-behavior: smooth;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--background);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 28px;
}

.site-nav__inner {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  height: var(--nav-height);
  align-items: center;
}

.site-nav a {
  color: var(--color);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.is-active {
  border-bottom-color: var(--color);
}

@media (max-width: 684px) {
  .site-nav__inner {
    justify-content: center;
    gap: 18px;
  }
}

/* Section headings land below the floating bar instead of behind it */
.index-content h2,
.index-content h3 {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

/* ------------------------------------------------------------------
   Headings and sections
   ------------------------------------------------------------------ */
.content .index-content {
  margin-top: 0;
}

.content .index-content h1 {
  font-size: 1.6rem;
  margin: 8px 0 4px;
}

/* The theme's (empty) blog list under the homepage */
.posts {
  display: none;
}

.index-content h2 {
  clear: both;
  margin-top: 2.2em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

/* ------------------------------------------------------------------
   Headshot in About Me — beside the text on wide screens, centred
   above it on phones
   ------------------------------------------------------------------ */
.headshot {
  float: right;
  width: var(--headshot-width);
  height: auto;
  margin: 4px 0 16px 24px;
  /* For a round photo, uncomment the next two lines:
  border-radius: 50%;
  aspect-ratio: 1; object-fit: cover; */
}

@media (max-width: 684px) {
  .headshot {
    float: none;
    display: block;
    width: 140px;
    margin: 0 auto 16px;
  }
}

/* ------------------------------------------------------------------
   Figures — the italic line right after an image becomes a caption
   ------------------------------------------------------------------ */
.index-content img {
  max-width: 100%;
  height: auto;
}

.index-content img + em {
  display: block;
  font-size: 0.85em;
  opacity: 0.7;
  margin-top: 8px;
}

/* Footer: small and quiet */
.footer {
  font-size: 0.8rem;
  opacity: 0.6;
}
/* ------------------------------------------------------------------
   Project cards (Research) â€” boxes with a figure on top
   ------------------------------------------------------------------ */
.cards {
  display: grid;
  /* grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* 2 columns on wide screens, 1 on phones */
  grid-template-columns: 1fr;   /* one card per row */
  gap: 20px;
  margin: 16px 0 8px;
}

.card {
  margin: 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  background: var(--background);
}

.card > * {
  margin-left: 18px;
  margin-right: 18px;
}

.card > p:first-child:has(img) {
  margin: 0 0 14px;
  border-bottom: 1px solid var(--border-color);
}

/*.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
} /* /* every card figure gets the same shape */

.card img {
  width: 100%;
  max-height: 340px;       /* keeps cards compact; click to see full size */
  object-fit: contain;     /* never crops the figure */
  display: block;
}

.card p {
  margin-top: 0;
  margin-bottom: 10px;
}

.card p:last-child {
  margin-bottom: 18px;
}

.card-meta {
  font-size: 0.85em;
  opacity: 0.65;
}

.tag {
  display: inline-block;
  font-size: 0.75em;
  padding: 1px 8px;
  margin: 0 4px 4px 0;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.03);
}

/* ------------------------------------------------------------------
   Publication boxes â€” one full-width box per paper
   ------------------------------------------------------------------ */
.pub {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 12px;
}

.pub p {
  margin: 0;
}

.zoomable {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  cursor: zoom-out;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
