/* Minimal academic site with two sections: Published & Working Papers */
:root {
  --text: #0f172a;
  --muted: #475569;
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #e5e7eb;
  --accent: #111827;
  --container: 900px;
  --pad: 1.25rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }

.skip {
  position: absolute; left: -999px; top: -999px;
}
.skip:focus { left: 0; top: 0; background: #fff; padding: .5rem 1rem; border:1px solid var(--border); }

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,.8);
  z-index: 10;
}
.id-block { padding: .85rem 0; }
.id-block h1 { font-size: 1.6rem; margin: 0; }
.tagline, .contact { margin: .25rem 0; color: var(--muted); }

.site-nav { padding-bottom: .85rem; }
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  margin-right: 1rem;
}
.site-nav a:hover { text-decoration: underline; color: var(--text); }

.section { padding: 2rem 0 1rem; }
.section h2 { font-size: 1.4rem; margin: 0 0 1rem; border-bottom: 1px solid var(--border); padding-bottom: .5rem; }

.paper { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.paper:last-child { border-bottom: none; }

.paper-title { margin: 0 0 .35rem; font-size: 1.05rem; line-height: 1.4; }
.meta { margin: 0 0 .5rem; color: var(--muted); }
.venue { font-style: italic; }

.links { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 .5rem; }
.btn {
  display: inline-block;
  padding: .4rem .7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--accent);
  background: #fff;
}
.btn:hover { filter: brightness(0.95); }

details { background: #fafafa; border: 1px solid var(--border); border-radius: 8px; padding: .5rem .75rem; }
summary { cursor: pointer; font-weight: 600; color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  color: var(--muted);
  padding: 1rem 0 2rem;
  text-align: center;
}

/* Link style */
a {
  color: #031355;        /* your link color */
  text-decoration: none; /* remove underline */
}
a:hover,
a:focus-visible {
  text-decoration: underline; /* keep a visible hover/focus cue */
}
a:visited {
  color: #0369a1; /* optional: visited color */
}


/* Intro: text + photo side-by-side */
.intro {
  display: grid;
  grid-template-columns: 1.4fr 1fr;  /* text | image */
  gap: 2rem;
  align-items: start;
  margin-top: .5rem;
}

.portrait { margin: 0; }
.portrait img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Stack on mobile */
@media (max-width: 800px) {
  .intro { grid-template-columns: 1fr; }
  .portrait { margin-top: 1rem; }
}

/* Published paper styling */
.pub { margin: 1.25rem 0 1.6rem; }

.pub-title {
  margin: 0 0 .15rem;
  font-size: 1.1rem;   /* try 1.1rem or 1.0rem */
  line-height: 1.35;
  font-weight: 600;
}

.pub-title a {
  color: #0369a1;               /* blue title link */
  text-decoration: none;
}
.pub-title a:hover,
.pub-title a:focus-visible {
  text-decoration: underline;
}

.pub-authors {
  margin: .35rem 0 0;
  font-size: 1rem;
  color: #111827;
}

.pub-venue {
  margin: .25rem 0 .4rem;
  color: #111827;
}
.pub-venue em { font-style: italic; }
.pub-venue .note { font-style: italic; }

.pub-links {
  margin: .35rem 0 0;
  font-size: .98rem;
}
.pub-links a {
  color: #0ea5e9;               /* link color for the bracketed items */
  text-decoration: none;
  font-style: italic;           /* italic like the example */
}
.pub-links a:hover,
.pub-links a:focus-visible {
  text-decoration: underline;
}

:root{
  --guinda: #7a0019;   /* deep maroon/burgundy */
}

.award {
  color: var(--guinda);
  /* keep italic if the parent isn't italic already */
  font-style: inherit;
  font-weight: 600;    /* optional: a bit bolder */
}

/* 1) Make the overall header non-sticky */
.site-header {
  position: static;    /* override any previous sticky */
  backdrop-filter: none;
  background: transparent;
  border-bottom: none;
}

/* 2) Create a slim sticky top bar for the title only */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}

/* Title look (adjust to taste) */
.site-title {
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

/* Keep your intro/photo styles as before */
/* Sticky, glassy title bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  /* glass effect */
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); /* Safari */
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 0.7rem 0;
  transition: background 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

/* When the page is scrolled a bit, make the bar more opaque & add a shadow */
.topbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  padding: 0.55rem 0; /* slight compact feel */
}

.site-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}
