/* ------------------------------------------------------------
   Pavlos Moraitis — site stylesheet
   Used by index.html, publications_category.html, publications_date.html
   ------------------------------------------------------------ */

/* tokens */
:root {
  --ink:        #1A1D2E;
  --ink-soft:   #2E3247;
  --paper:      #FBFAF7;
  --paper-2:    #F4F1EB;
  --brand:      #0000FF;
  --brand-dk:   #0000C8;
  --teal:       #0F7765;
  --rule:       #E2DDD3;
  --muted:      #5F6470;

  --serif:  Charter, "Bitstream Charter", "Sitka Text", Cambria, "Source Serif Pro", Georgia, serif;
  --sans:   -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono:   ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  --measure: 64ch;
  --aside-w: 19rem;
}

/* reset / base */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 255, 0.25);
  transition: color .15s ease, border-color .15s ease;
}
a:hover { color: var(--brand-dk); border-bottom-color: var(--brand-dk); }
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-bottom-color: transparent;
}

/* topbar */
.topbar {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--paper);
}
.topbar__brand { display: flex; align-items: center; gap: 1.25rem; }
.topbar__brand img { height: 64px; width: auto; }
.topbar__brand .lipade-logo { height: 58px; }   /* slightly smaller — different proportions */
.topbar__lab {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: normal;
  color: var(--brand);
  text-transform: none;
}
.topbar__lab a {
  color: var(--brand);
  border-bottom-color: rgba(0, 0, 255, 0.25);
}
.topbar__lab a:hover { color: var(--brand-dk); border-bottom-color: var(--brand-dk); }

/* layout */
.layout {
  max-width: 76rem;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: grid;
  grid-template-columns: var(--aside-w) 1fr;
  gap: 4rem;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2rem 1.25rem 3rem;
  }
  .topbar { padding: 1rem 1.25rem; flex-wrap: wrap; }
}

/* aside */
.aside { position: sticky; top: 2rem; align-self: start; }
@media (max-width: 900px) { .aside { position: static; } }

.portrait-wrap {
  position: relative;
  width: 60%;
  aspect-ratio: 4 / 5;
  max-height: 16rem;
  background: var(--paper-2);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.portrait-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.portrait-wrap::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 32%; height: 4px;
  background: var(--brand);
}
.portrait-wrap[data-empty="true"]::before {
  content: "PORTRAIT";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.name {
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}
.name .sur { color: var(--brand); }
.role {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}
.role .org {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}
.flag {
  display: inline-block;
  width: 18px;
  height: auto;
  vertical-align: -2px;
  margin-left: 0.35rem;
  border: 1px solid rgba(0,0,0,0.08);
}

/* nav */
.nav {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
.nav__label, .contact__label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.7rem;
}
.nav ul { list-style: none; padding: 0; margin: 0; }
.nav li { padding: 0.18rem 0; }
.nav li.sub { padding-left: 1rem; }
.nav a {
  color: var(--ink);
  border-bottom: none;
  font-size: 0.95rem;
  display: inline-block;
  padding: 0.1rem 0;
}
.nav a:hover { color: var(--brand); }
.nav a.current { color: var(--brand); font-weight: 600; }
.nav a.current::before {
  content: "—";
  display: inline-block;
  margin-right: 0.4rem;
  color: var(--brand);
}

/* contact card / aside-block */
.contact {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.contact p { margin: 0 0 0.2rem; }
.contact .email { font-family: var(--mono); font-size: 0.8rem; word-break: break-all; }
.contact .email a { border-bottom: 1px dotted var(--brand); }
.contact .sort-link {
  color: var(--ink);
  border-bottom: none;
  font-size: 0.9rem;
}
.contact .sort-link:hover { color: var(--brand); }
.contact .sort-link.current { color: var(--brand); font-weight: 600; }

/* AT card */
.at-card {
  margin-top: 1.8rem;
  padding: 1.1rem 1.1rem 1.2rem;
  background: var(--paper-2);
  border-left: 3px solid var(--teal);
}
.at-card__eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.65rem;
}
.at-card__logo-link {
  display: block;
  border-bottom: none;
  margin: 0 0 0.7rem;
}
.at-card__logo-link:hover { opacity: 0.85; }
.at-card__logo {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
}
.at-card__desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

/* main + thread */
.main {
  max-width: var(--measure);
  position: relative;
  padding-left: 1.6rem;
}
.main::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7rem; bottom: 1rem;
  width: 1px;
  background: var(--rule);
}
@media (max-width: 900px) { .main { padding-left: 1.1rem; } }

.section {
  padding-top: 0.4rem;
  margin-bottom: 3rem;
  position: relative;
}
.section::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.95rem;
  width: 0.75rem;
  height: 1px;
  background: var(--brand);
}
@media (max-width: 900px) {
  .section::before { left: -1.1rem; width: 0.55rem; }
}

.section__eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.section__title {
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 0 0 1.4rem;
  color: var(--ink);
}
.section p { margin: 0 0 1.05rem; color: var(--ink-soft); }
.section p:last-child { margin-bottom: 0; }

/* recent-work pull paragraph */
.recent {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink);
}
.recent .ns {
  color: var(--brand);
  font-weight: 600;
  font-style: italic;
}
.recent .raison {
  color: var(--teal);
  font-weight: 600;
  font-family: var(--serif);
  font-size: 1.12em;
}

/* domain pills */
.domains {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
}
.domains li {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
}
.domains li::before {
  content: "·";
  color: var(--brand);
  margin-right: 0.4rem;
  font-weight: 700;
}

/* inline emphasis */
.em { color: var(--brand); font-weight: 600; }
.em-teal { color: var(--teal); font-weight: 600; }
.raison-mark {
  color: var(--teal);
  font-weight: 700;
  font-family: var(--serif);
  font-size: 1.2em;
}
.raison-mark .ai {
  font-size: 0.78em;
  vertical-align: 1px;
  letter-spacing: 0.02em;
}

/* footer */
.footer {
  max-width: 76rem;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
@media (max-width: 900px) { .footer { padding: 1.5rem 1.25rem 2.5rem; } }
.footer a { color: var(--brand); border-bottom-color: transparent; }
.footer a:hover { color: var(--brand-dk); border-bottom-color: var(--brand-dk); }

/* ------------------------------------------------------------
   Publications-specific
   ------------------------------------------------------------ */

.publications .pubs-section {
  margin-bottom: 2.6rem;
}
.publications .pubs-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pub-list > li {
  position: relative;
  padding: 0.7rem 0 0.85rem 1.6rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.pub-list > li:last-child { border-bottom: none; }
.pub-list > li::before {
  content: "•";   /* • bullet */
  position: absolute;
  left: 0.2rem;
  top: 0.85rem;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--brand);
}

/* style inline elements inside publication entries */
.pub-list i, .pub-list em { color: var(--ink); font-style: italic; }
.pub-list a {
  color: var(--brand);
  border-bottom: 1px solid rgba(0, 0, 255, 0.25);
  font-weight: 500;
}
.pub-list a:hover { color: var(--brand-dk); border-bottom-color: var(--brand-dk); }
.pub-list strong, .pub-list b {
  color: var(--ink);
  font-weight: 600;
}

/* book-cover entries (edited proceedings) */
.pub-list > li.has-cover {
  display: grid;
  grid-template-columns: 96px 1fr;
  column-gap: 1.2rem;
  align-items: start;
  padding-left: 0;
}
.pub-list > li.has-cover::before { content: none; }
.book-cover {
  width: 96px;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.book-text { color: var(--ink-soft); }

/* ------------------------------------------------------------
   PhD students list
   ------------------------------------------------------------ */

.phd-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.phd-list > li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  column-gap: 1.5rem;
  row-gap: 0.15rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.phd-list > li:last-child { border-bottom: none; }

.phd-years {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--brand);
  font-weight: 600;
  grid-column: 1;
  grid-row: 1 / 2;
  align-self: start;
  padding-top: 0.15rem;
}
.phd-name, .phd-prior, .phd-topic {
  grid-column: 2;
}
.phd-name {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.phd-prior, .phd-topic {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.phd-topic {
  font-style: italic;
  color: var(--ink);
}

@media (max-width: 600px) {
  .phd-list > li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .phd-years { grid-row: auto; grid-column: 1; }
  .phd-name, .phd-prior, .phd-topic { grid-column: 1; }
}
