/* ============================================================
   academic.css — quiet faculty homepage
   Hugo Proença header hierarchy + Barron / Isola paper rows.
   ============================================================ */

:root {
  --ink: #222;
  --muted: #555;
  --line: #ddd;
  --link: #0b57d0;
  --link-hover: #083ea0;
  --wash: #fff8e6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

p { margin: 0 0 0.7em; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: #dce8ff; }

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  border-bottom: 1px solid var(--line);
  margin: 0 -24px 8px;
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.nav-brand {
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.nav-brand:hover { text-decoration: none; color: var(--ink); }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.95em;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--link);
  text-decoration: none;
}

/* ============================================================
   ABOUT / HEADER
   ============================================================ */
.about { padding: 28px 0 8px; }

.about-content {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.profile-pic { flex: 0 0 auto; }
.profile-pic img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.about-text { flex: 1 1 auto; min-width: 0; }

.name {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 8px;
  color: var(--ink);
}

.affiliation {
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 0.95em;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 10px;
}
.affiliation span { display: block; }

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0 0 14px;
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 0.95em;
}
.link-list li { display: inline; }
.link-list .sep { color: var(--muted); margin: 0 6px; }

.bio { max-width: 38em; }
.bio p { margin-bottom: 0.7em; }
.bio p:last-child { margin-bottom: 0; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 28px 0 4px; }

.section-title {
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
}

.section-note {
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 0.92em;
  color: var(--muted);
  margin: -8px 0 16px;
}

.year-title {
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 1em;
  font-weight: 600;
  color: var(--ink);
  margin: 22px 0 12px;
}

/* ============================================================
   NEWS
   ============================================================ */
.news-item {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 12px;
  margin: 0 0 10px;
  align-items: baseline;
}

.news-date {
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 0.92em;
  color: var(--muted);
  white-space: nowrap;
}

.news-text { font-size: 0.98em; }
.news-text p { margin: 0; display: inline; }
.news-text p + p { display: block; margin-top: 4px; }

.older-news {
  margin-top: 8px;
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
}
.older-news summary {
  cursor: pointer;
  color: var(--link);
  font-size: 0.95em;
}
.older-news summary:hover { text-decoration: underline; }
.older-news .news-item { margin-top: 10px; }

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.pub {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 20px;
}

.pub.selected {
  background: var(--wash);
  border-left: 3px solid #e6d08a;
  padding: 10px 12px;
  margin-left: -15px;
  margin-right: -12px;
}

.pub-visual {
  flex: 0 0 140px;
  width: 140px;
}
.pub-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
}

.publication { flex: 1 1 auto; min-width: 0; }

.papertitle {
  font-weight: 600;
  line-height: 1.3;
}

.authors {
  font-size: 0.95em;
  margin: 2px 0 1px;
}
.authors .me { font-weight: 700; }

.pub-venue {
  font-size: 0.92em;
  font-style: italic;
  color: var(--muted);
  margin: 1px 0 4px;
}

.pub-links {
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 0.92em;
}
.pub-links a { margin-right: 2px; }

/* ============================================================
   RESEARCH / PROJECTS / SERVICE LISTS
   ============================================================ */
.research-block { margin: 0 0 18px; }
.research-block h3 {
  font-size: 1.02em;
  font-weight: 600;
  margin: 0 0 4px;
}
.research-block p { margin: 0 0 6px; }

.plain-list { list-style: disc; padding-left: 1.2em; margin: 0 0 6px; }
.plain-list li { margin: 2px 0; }

.text-links {
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 0.95em;
  margin: 0;
}

.entry { margin: 0 0 16px; }
.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.entry-title { font-weight: 600; }
.entry-dates {
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9em;
  color: var(--muted);
  white-space: nowrap;
}
.entry-sub { font-size: 0.95em; color: var(--muted); margin: 1px 0 3px; }
.entry-desc { font-size: 0.98em; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  font-size: 0.88em;
  color: var(--muted);
}
.footer p { margin: 2px 0; }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 720px) {
  body { padding: 0 16px 40px; }
  .site-nav { margin: 0 -16px 8px; }
  .nav-inner { padding: 10px 16px; flex-wrap: wrap; }

  .about { padding: 20px 0 4px; }
  .about-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .profile-pic img { width: 120px; height: 120px; }
  .name { font-size: 1.7rem; }

  .pub { flex-direction: column; gap: 10px; }
  .pub.selected {
    margin-left: -8px;
    margin-right: -8px;
  }
  .pub-visual { width: 100%; max-width: 240px; }

  .news-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .entry-head { flex-direction: column; gap: 0; }
  .entry-dates { white-space: normal; }
}
