/* ============================================================
   publication.css — Single publication page
   Depends on: global.css, doc.css, person.css (.person-social-btn)
   ============================================================ */

/* ── Page ──────────────────────────────────────────────────── */
.pub-single-page {
  min-height: calc(100vh - var(--nav-height));
  background: var(--footer-light, #f7f7f7);
  padding-bottom: 80px;
}

.pub-single-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

/* ── Cover image ───────────────────────────────────────────── */
.pub-single-cover {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--color-light-blue-bg);
}

.pub-single-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Header ────────────────────────────────────────────────── */
.pub-single-header {
  background: var(--color-white);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pub-single-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pub-single-type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-grey);
}

.pub-single-date {
  font-size: 0.78rem;
  color: var(--color-grey);
  font-style: normal;
}

.pub-single-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-black);
  margin: 0;
}

/* ── Body layout ───────────────────────────────────────────── */
.pub-single-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Article text ──────────────────────────────────────────── */
.pub-single-text {
  background: var(--color-white);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  padding: 28px 32px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-black);
}

/* Typography inside article */
.pub-single-text p {
  margin: 0 0 1.1em;
}
.pub-single-text p:last-child { margin-bottom: 0; }

.pub-single-text ul,
.pub-single-text ol {
  padding-left: 1.4em;
  margin: 0 0 1.1em;
}
.pub-single-text li { margin-bottom: 0.4em; }

.pub-single-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.4em 0 0.5em;
  color: var(--color-black);
}

.pub-single-text h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.2em 0 0.4em;
  color: var(--color-black);
}

.pub-single-text a {
  color: var(--color-accent);
  text-decoration: underline;
  transition: opacity 0.2s;
}
.pub-single-text a:hover { opacity: 0.65; }

.pub-single-text b { font-weight: 700; }
.pub-single-text i { font-style: italic; }

/* YouTube embed */
.pub-single-text iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 10px;
  margin: 0.8em 0;
}

/* Inline images */
.pub-single-text img {
  max-width: 100%;
  border-radius: 10px;
  margin: 0.8em 0;
}

/* ── Author card ───────────────────────────────────────────── */
.pub-author-card {
  background: var(--color-white);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Photo */
.pub-author-photo-wrap {
  flex-shrink: 0;
}

.pub-author-photo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 32%;
}

.pub-author-photo--logo {
  border-radius: 50%;
  padding: 6px;
  background: var(--color-light-blue-bg);
}

/* Info */
.pub-author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pub-author-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-grey);
}

.pub-author-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-black);
  text-decoration: none;
  transition: opacity 0.2s;
}
.pub-author-name:hover { opacity: 0.6; }

.pub-author-position {
  font-size: 0.78rem;
  color: var(--color-grey);
  line-height: 1.4;
}

.pub-author-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.pub-author-role {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-tag);
  border-radius: 20px;
  padding: 2px 9px;
}

.pub-author-socials {
  margin-top: 6px;
}

/* Org card variant */
.pub-author-card--org .pub-author-position {
  font-size: 0.75rem;
  color: var(--color-grey);
  max-width: 400px;
}

/* ── Back link ─────────────────────────────────────────────── */
.pub-single-back a {
  font-size: 0.85rem;
  color: var(--color-grey);
  text-decoration: none;
  transition: color 0.2s;
}
.pub-single-back a:hover { color: var(--color-black); }

.pub-lang-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--color-white);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 12px;
  padding: 14px 20px;
}

.post-lang-btn.active {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}



.person-socials {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.person-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.person-social-btn:hover {
  opacity: 0.75;
  transform: translateY(-2px);
}
.person-social-btn:focus-visible {
  outline: 3px solid var(--color-black);
  outline-offset: 2px;
}
.person-social-btn img {
  width: 16px;
  height: 16px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .pub-single-container {
    padding: 24px 16px 0;
  }

  .pub-single-header,
  .pub-single-text {
    padding: 20px 18px;
    border-radius: 12px;
  }

  .pub-single-title {
    font-size: 1.3rem;
  }

  .pub-single-cover {
    border-radius: 12px;
    margin-bottom: 20px;
  }

  .pub-author-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    border-radius: 12px;
    gap: 14px;
  }

  .pub-author-photo {
    width: 60px;
    height: 60px;
  }
}