/* =============================================================
   ITI Design System — Single person
   Loaded only on person posts. Replaces css/single-people.css.

   The bio, the publication list and the contact block are all shortcode
   output whose markup cannot be changed from the template, so they are
   styled through the classes those shortcodes emit:

     [people_content]                  .people, .img-personel-single,
                                       .position-2, .education
     [publications_people_single_min]  #publications_loop, .publication,
                                       .publication_authors
     [people_contact_template]         .contact, .people-contact, .address
   ============================================================= */

.pe { font-family: var(--iti-font-sans); }

.pe-name { max-width: 20ch; }

/* =========================================================
   Profile controls — [edit_profile] / [make_private_button]
   Shown only to the people who may use them, so this block is often
   empty and the template omits it entirely when it is.
   ========================================================= */

.pe .button-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--iti-s-3);
  margin-bottom: var(--iti-s-5);
  /* css/style.css centres this and gives it a grey panel and 20px of padding
     — it is the same class the hero button block on a ΦΟΡΕΑΣ post uses, where
     that is right. Here it left the two controls floating in the middle of a
     column whose every other line starts at the left edge. */
  justify-content: flex-start;
  padding: 0;
  background: none;
}
.pe .button-container a,
.pe .button-container button,
.pe .button-container input[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: var(--iti-s-2);
  padding: .55rem 1rem;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid var(--iti-line-strong);
  background: var(--iti-surface);
  color: var(--iti-text);
  text-decoration: none;
  clip-path: var(--iti-clip-sm);
  transition: border-color var(--iti-dur) var(--iti-ease),
              color var(--iti-dur) var(--iti-ease);
}
.pe .button-container a:hover,
.pe .button-container a:focus-visible,
.pe .button-container button:hover,
.pe .button-container button:focus-visible { border-color: var(--iti-electric); color: var(--iti-blue); }

.pe .button-container a:focus-visible,
.pe .button-container button:focus-visible {
  outline: 2px solid var(--iti-electric);
  outline-offset: 1px;
}

/* Editing fills amber on hover — the colour this control carried as its
   background before, and the same state the edit button on a project and an
   announcement uses (.open-modal-button in the custom-form-edit plugin). */
.pe .button-container .edit-profile:hover,
.pe .button-container .edit-profile:focus-visible {
  color: var(--iti-text);
  background: #ffa500;
  border-color: #ffa500;
}

/* Hiding a profile is the destructive one of the two, so it is marked — but
   as an outline rather than the flat red fill it carried inline, which made
   it the loudest thing on the page above a person's own name. It fills only
   when the pointer is on it. */
.pe .button-container .make-private {
  color: var(--iti-ember-ink);
  border-color: rgba(255, 106, 31, .45);
}
.pe .button-container .make-private:hover,
.pe .button-container .make-private:focus-visible {
  color: var(--iti-on-dark);
  background: var(--iti-ember-ink);
  border-color: var(--iti-ember-ink);
}

/* =========================================================
   Bio — output of [people_content]
   ========================================================= */

.pe .people_content {
  margin-bottom: var(--iti-s-7);
  padding: clamp(1.25rem, .8rem + 1.6vw, 2.25rem);
  /* The name is the first thing in the card, so it carries less headroom
     than the body copy below it needs. */
  padding-top: clamp(1rem, .7rem + 1vw, 1.5rem);
  background: var(--iti-surface);
  border: 1px solid var(--iti-line);
  clip-path: var(--iti-clip);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--iti-text);
  /* The portrait floats right inside. */
  overflow: hidden;
}

.pe .people_content .img-personel-single {
  float: right;
  max-width: 40%;
  height: auto;
  margin: 0 0 var(--iti-s-4) var(--iti-s-5);
  border: 1px solid var(--iti-line);
  clip-path: var(--iti-clip-sm);
}

/* The name, printed above the bio as the old template had it. The portrait
   floats right inside [people_content], which follows, so the name takes
   the full width and the picture sits beside the copy under it — the same
   arrangement as before. */
/* Written to outrank the generic `.people_content h2` rule further down —
   that one is for headings inside the bio copy, not for this one. */
.pe .people_content > .people_name {
  /* Room between the name and the affiliation under it. They were .15em
     apart, which read as one wrapped line rather than two facts. */
  margin: 0 0 .45em;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--iti-text);
  text-wrap: balance;
}

/* css/style.css nudges .people 10px to the right. The name is not inside
   that wrapper and so was not nudged, which left the affiliation starting
   10px in from the name above it. */
.pe .people_content > .people { margin-left: 0; }

/* The affiliation line the shortcode prints under it. */
.pe .people_content .position-2 {
  margin: 0 0 .9em;
  padding-bottom: .7em;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--iti-electric-ink);
  border-bottom: 1px solid var(--iti-line);
}

.pe .people_content p { margin: 0 0 1.05em; }
.pe .people_content > *:last-child,
.pe .people_content .people > *:last-child { margin-bottom: 0; }
.pe .people_content strong, .pe .people_content b { font-weight: 600; color: var(--iti-text); }
.pe .people_content a {
  color: var(--iti-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pe .people_content a:hover { color: var(--iti-blue-700); }

.pe .people_content h2, .pe .people_content h3, .pe .people_content h4, .pe .people_content h5, .pe .people_content h6 {
  margin: 1.5em 0 .5em;
  font-weight: 600;
  line-height: 1.25;
  color: var(--iti-text);
}
.pe .people_content h2 { font-size: 1.25rem; }
.pe .people_content h3 { font-size: 1.12rem; }
.pe .people_content h4, .pe .people_content h5, .pe .people_content h6 { font-size: 1.02rem; }

.pe .people_content ul, .pe .people_content ol { margin: 0 0 1.05em; padding-left: 1.35em; }
.pe .people_content li { margin-bottom: .4em; }
.pe .people_content ul li { list-style: disc; }
.pe .people_content ol li { list-style: decimal; }
/* Degrees, awards and the like — one line each, marked rather than bulleted. */
.pe .people_content .education { padding-left: 0; }
.pe .people_content .education li {
  position: relative;
  list-style: none;
  padding-left: 1.15em;
}
.pe .people_content .education li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: 6px; height: 1px;
  background: var(--iti-electric-dim);
}
.pe .people_content img { max-width: 100%; height: auto; }
.pe .people_content table { width: 100%; border-collapse: collapse; margin: 0 0 1.05em; }
.pe .people_content th, .pe .people_content td {
  border: 1px solid var(--iti-line);
  padding: .5rem .7rem;
  text-align: left;
}

/* =========================================================
   Publications — output of [publications_people_single_min]
   ========================================================= */

/* css/style.css gives .people_publication and .people_contact_template a
   10px left margin, which would push those two cards out of line with the
   bio above them. */
.pe .people_publication,
.pe .people_contact_template { margin-left: 0; }

.pe .people_publication {
  margin-bottom: var(--iti-s-7);
  padding: clamp(1.25rem, .8rem + 1.6vw, 2.25rem);
  background: var(--iti-surface);
  border: 1px solid var(--iti-line);
  clip-path: var(--iti-clip);
}
/* The "Εμφάνιση όλων (21)" line. */
.pe .people_publication #publications_loop > p {
  margin: 0 0 var(--iti-s-4);
  font-size: .9rem;
  color: var(--iti-text-muted);
}
.pe .people_publication a { color: var(--iti-blue); text-decoration: none; }
.pe .people_publication a:hover { color: var(--iti-blue-700); text-decoration: underline; text-underline-offset: 2px; }

.pe .people_publication ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--iti-line); }
/* css/style.css sets `#publications_loop ul li { list-style: disc outside none }`,
   an id selector that outranks a plain class. The rows are separated by rules
   here, so the discs are redundant — matched to be removed. */
.pe .people_publication #publications_loop ul li { list-style: none; margin-bottom: 0; }
.pe .people_publication .publication,
.pe .people_publication ul > li {
  margin: 0;
  padding: .7rem .2rem;
  list-style: none;
  font-size: .92rem;
  line-height: 1.6;
  color: var(--iti-text);
  border-bottom: 1px solid var(--iti-line);
}
.pe .people_publication ul > li:last-child { border-bottom: 0; }
.pe .people_publication .publication_authors b { font-weight: 600; color: var(--iti-text); }
.pe .people_publication i { color: var(--iti-text); }

/* =========================================================
   Contact — the same block as on an announcement: a cyan eyebrow
   heading over a paper panel inside a white card.
   ========================================================= */

.pe .people_contact_template {
  margin-bottom: var(--iti-s-6);
  padding: clamp(1.25rem, .8rem + 1.6vw, 2.25rem);
  background: var(--iti-surface);
  border: 1px solid var(--iti-line);
  clip-path: var(--iti-clip);
}
/* Both section headings on this page — Επικοινωνία, and the shortcode's own
   "Πρόσφατες Δημοσιεύσεις" — set as Ταυτότητα Έργου is on a project; see
   .info-frame-title in css/iti-project-single.css. They were both the small
   uppercase eyebrow, which is a different treatment for the same job on the
   same kind of panel. One selector, so they cannot drift apart. */
.pe .contact-heading,
.pe .people_publication #publications_loop > h3,
.pe .people_publication h3 {
  display: flex;
  align-items: center;
  gap: var(--iti-s-3);
  margin: 0 0 var(--iti-s-4);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--iti-text);
}
.pe .contact-heading::before,
.pe .people_publication h3::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--iti-electric);
  box-shadow: var(--iti-electric-glow);
  flex: none;
}
.pe .people-contact-panel {
  padding: var(--iti-s-5);
  background: var(--iti-paper);
  border: 1px solid var(--iti-line);
  clip-path: var(--iti-clip-sm);
  color: var(--iti-text);
  line-height: 1.7;
}
.pe .people-contact-panel a { color: var(--iti-blue); }
.pe .people-contact-panel a:hover { color: var(--iti-blue-700); }

/* The shortcode prints its own label; the heading above says the same
   word, so showing both would print it twice. */
.pe .people-contact-panel > .contact,
.pe .people-contact-panel > .contact + br { display: none; }

/* css/style.css gives .people-contact a 20px top margin, which would push
   the name a line clear of the panel's own padding. */
.pe .people-contact-panel .people-contact { margin: 0; }
.pe .people-contact-panel h5 {
  margin: 0 0 var(--iti-s-2);
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--iti-text);
}
.pe .people-contact-panel .contact-title { display: inline; font-weight: 700; }
.pe .people-contact-panel .building-office { margin-bottom: .2rem; }
.pe .people-contact-panel .building-office { margin-bottom: .2rem; }
.pe .people-contact-panel .address,
.pe .people-contact-panel p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--iti-text);
}

/* =========================================================
   Back link
   ========================================================= */

.pe .people-back { margin: 0; }
.pe .iti-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--iti-s-2);
  font-size: .9rem;
  font-weight: 500;
  color: var(--iti-blue);
  text-decoration: none;
}
.pe .iti-link-arrow svg { transition: transform var(--iti-dur) var(--iti-ease); }
.pe .iti-link-arrow:hover { color: var(--iti-blue-700); }
.pe .iti-link-arrow:hover svg { transform: translateX(-3px); }

/* =========================================================
   Narrow screens
   ========================================================= */

@media (max-width: 600px) {
  .pe .people_content .img-personel-single {
    float: none;
    display: block;
    max-width: 180px;
    margin: 0 0 var(--iti-s-4);
  }
}
