/* -------- Base -------- */
html {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: larger;
  font-weight: 300;
}

a {
  text-decoration: none;
  color: #1565c0;
}
a:hover {
  color: #217ee7;
}

/* -------- Homepage (centered card) -------- */


.avatar {
  border-radius: 50%;
  width: 150px;
}

/* Icons row under the intro */
.icons {
  list-style-type: none;
  font-size: xx-large;
  padding: 0;
  display: flex;
  justify-content: space-between;
  width: 80%;
  max-width: 320px;
  margin: 1em auto;
}
.icons li {
  display: inline;
  width: 42px;
}
.icons a {
  color: #000;
}
.icons a:hover {
  color: #1565c0;
}

/* -------- Top navigation -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #f7f7f7;
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 1.25rem;
}
.nav {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav a {
  font-weight: 600;
  text-decoration: none;
  color: #111;
}
.nav-links a {
  margin-left: 1.25rem;
}
.nav a:hover,
.nav a[aria-current="page"] {
  text-decoration: underline;
}

/* -------- Subpages (e.g., research.html) -------- */
body.page #content {
  position: static;     /* turn off absolute centering */
  top: auto;
  left: auto;
  transform: none;
  max-width: 900px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
  text-align: left;
}
body.page h1 {
  margin: 0 0 1.25rem 0;
}
body.page h2 {
  margin: 2rem 0 0.75rem 0;
}

/* Publication/working paper lists */
.pub-list {
  margin-left: 1.25rem;
  line-height: 1.55;
}
.pub-list li {
  margin-bottom: 0.6rem;
}

/* Anchor jumps account for sticky header */
html {
  scroll-padding-top: 72px;
}

/* HOMEPAGE: left sidebar layout */
body.home #content {
  position: static;
  max-width: 1000px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
  text-align: left;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;  /* ≈ left third / right two-thirds */
  gap: 2rem;
  align-items: start;
}

.sidebar .avatar {
  border-radius: 50%;
  width: 200px;
  height: auto;
}

.name { margin: 0.75rem 0 0.25rem; font-weight: 600; }
.subtitle { color: #444; margin-bottom: 0.75rem; }

.main p { text-align: justify; }

/* Tighter icon row in the sidebar */
.sidebar-icons {
  justify-content: flex-start;
  gap: 0.75rem;
  width: auto;
  max-width: none;
  margin: 0.5rem 0 0;
}
.sidebar-icons li { width: auto; }
.sidebar-icons a { font-size: 1.25rem; }

/* Bluesky icon sizing: match Font Awesome sizing and inherit hover color */
.sidebar-icons a svg { width: 1.25rem; height: 1.25rem; vertical-align: -0.125em; fill: currentColor; }

/* ---------- Mobile layout for homepage ---------- */
@media (max-width: 860px) {
  body.home #content {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }
  .home-grid {
    grid-template-columns: 1fr;     /* stack: sidebar then main */
    gap: 1.25rem;
  }
  .sidebar {
    text-align: center;              /* center the photo + lines on mobile */
  }
  .sidebar .avatar {
    width: 160px;
  }
  .sidebar-icons {
    justify-content: center;         /* center the icon row */
    gap: 1rem;
    margin-top: 0.5rem;
  }
  .main p {
    text-align: left;                /* keep body text left-aligned for readability */
  }
}

@media (max-width: 480px) {
  .sidebar .avatar { width: 128px; }
}

/* ---- CV page tweaks ---- */
.cv-actions { margin: 0.5rem 0 1rem; }
.cv-actions .button {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.cv-actions .button:hover { border-color: #ccc; }
.cv-note { margin-left: 0.5rem; color: #555; font-size: 0.95em; }
.cv-embed { margin-top: 1rem; }

/* Hide the PDF embed on phones/tablets; show only the link */
@media (max-width: 860px) {
  .cv-embed { display: none; }
}