/* ==========================================================================
   Blog, posts e perfis — camada editorial (inspirada em revistas impressas)
   Texto corrido: Inter (a mesma do site), ajustada para leitura longa · Títulos: Space Grotesk
   ========================================================================== */
:root {
  --reading: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --condensed: var(--font-display);  /* rótulos: mesma família dos títulos do site */
  --rule: #d9dee7;
  --reading-scale: 1;
}

.chapeu { font-family: var(--font-display); font-size: 0.76rem; letter-spacing: 0.14em; }
.linha-fina { font-family: var(--font-body); color: var(--text-muted); font-size: 1.06rem; line-height: 1.55; }

/* ---------- Assinatura ---------- */
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; font-family: var(--font-body); font-size: 0.9rem; color: var(--text-muted); }
.byline-photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: top; margin-right: 0.15rem; }
.byline-author { color: var(--text-strong); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(16,185,129,0.5); text-underline-offset: 3px; }
.byline-author:hover { color: var(--emerald); }
.byline-sep { color: var(--rule); }
.byline-compact { font-size: 0.92rem; margin-top: 0.6rem; }

/* ==========================================================================
   Índice do blog
   ========================================================================== */
.blog-page { background: var(--paper); padding: calc(74px + clamp(2rem, 5vw, 3.5rem)) 0 clamp(3rem, 7vw, 5rem); }
.blog-masthead { border-bottom: 3px double var(--text-strong); padding-bottom: 1.6rem; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.blog-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4rem); line-height: 1.05; margin-top: 0.5rem; max-width: 20ch; }
.blog-authors { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 1.4rem; font-family: var(--font-body); font-size: 1rem; color: var(--text-muted); }
.author-pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.9rem 0.25rem 0.25rem; border: 1px solid var(--paper-line); border-radius: 999px; color: var(--text-strong); font-weight: 600; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.author-pill img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: top; }
.author-pill:hover { border-color: var(--emerald); background: var(--emerald-soft); }
.blog-rss { margin-left: auto; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--text-muted); border-bottom: 1px solid currentColor; }
.blog-rss:hover { color: var(--emerald); }

.blog-lead { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.4rem, 4vw, 3rem); align-items: center; padding-bottom: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--rule); }
.blog-lead-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: var(--paper-3); }
.blog-lead-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.blog-lead:hover .blog-lead-img img { transform: scale(1.03); }
.blog-lead-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.9rem); line-height: 1.08; margin: 0.6rem 0 0.9rem; }
.blog-lead-title a:hover { color: var(--emerald); }
.blog-lead .linha-fina { margin-bottom: 1.2rem; }

.blog-section-title { font-family: var(--condensed); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-strong); padding: 2rem 0 0.6rem; border-bottom: 1px solid var(--text-strong); }

.post-list { list-style: none; padding: 0; }
.post-row { display: grid; grid-template-columns: 1fr 220px; gap: clamp(1rem, 3vw, 2rem); align-items: start; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.post-row:not(:has(.post-row-thumb)) { grid-template-columns: 1fr; }
.post-row-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); line-height: 1.2; margin: 0.3rem 0 0.4rem; }
.post-row-title a:hover { color: var(--emerald); }
.post-row .linha-fina { font-size: 1.02rem; color: var(--text-muted); }
.post-row-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 3px; background: var(--paper-3); }
.post-row-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.post-row:hover .post-row-thumb img { transform: scale(1.05); }

@media (max-width: 860px) {
  .blog-lead { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr 120px; }
  .post-row .linha-fina { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ==========================================================================
   Post
   ========================================================================== */
.reading-progress { position: fixed; top: 74px; left: 0; right: 0; height: 3px; z-index: 95; background: transparent; }
.reading-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--emerald), var(--gold)); transition: width 0.1s linear; }

.post { background: var(--paper); padding: calc(74px + clamp(2rem, 5vw, 3.5rem)) var(--gutter) 2rem; }
.post-head, .post-cover, .post-foot { max-width: 720px; margin-inline: auto; }
.prose { max-width: 680px; margin-inline: auto; }   /* ~70 caracteres por linha */
.post-back { display: flex; width: fit-content; align-items: center; gap: 0.4rem; font-family: var(--condensed); font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.6rem; }
.post-back svg { width: 1rem; }
.post-back:hover { color: var(--emerald); }
.post-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); line-height: 1.06; margin: 0.6rem 0 1rem; }
.post-linha-fina { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); color: var(--text-muted); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; padding: 1rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.reader-tools { display: flex; align-items: center; gap: 0.3rem; }
.reader-label { font-family: var(--condensed); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-right: 0.2rem; }
.reader-btn { min-width: 38px; height: 38px; padding: 0 0.55rem; display: inline-grid; place-items: center; border: 1px solid var(--paper-line); border-radius: 8px; background: var(--paper); color: var(--text-strong); font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; line-height: 1; transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease); }
.reader-btn sup { font-size: 0.7em; }
.reader-btn-lg { font-size: 1.25rem; }
.reader-btn[data-share] { font-family: var(--font-display); font-size: 0.8rem; }
.reader-btn svg { width: 16px; height: 16px; }
.reader-btn:hover { border-color: var(--emerald); color: var(--emerald); }
.reader-btn.is-active { background: var(--text-strong); border-color: var(--text-strong); color: #fff; }
.reader-btn.is-copied { background: var(--emerald); border-color: var(--emerald); color: #04170f; }
.reader-divider { width: 1px; height: 22px; background: var(--rule); margin: 0 0.3rem; }

.post-cover { margin-top: 2rem; margin-bottom: 0.5rem; max-width: 960px; }
.post-cover img { width: 100%; border-radius: 4px; }

/* Corpo do texto — escala controlada pelo botão A−/A+ */
.prose {
  overflow-wrap: break-word; font-family: var(--reading); font-optical-sizing: auto;
  font-size: calc(1.125rem * var(--reading-scale)); line-height: 1.78; letter-spacing: -0.003em;
  color: #2a3140; padding-top: 1.6rem; text-wrap: pretty;
  font-feature-settings: "cv11" 1, "ss03" 1;   /* "a" de um andar e "g" simples: lembram a Space Grotesk dos títulos */
}
.prose > * + * { margin-top: 1.2em; }
.prose > p:first-of-type { font-size: 1.08em; color: var(--text-strong); }   /* primeiro parágrafo como abertura */
.prose h2, .prose h3, .prose h4 { font-family: var(--font-display); font-weight: 600; color: var(--text-strong); letter-spacing: -0.015em; line-height: 1.22; margin-top: 2em; text-wrap: balance; }
.prose :is(h2, h3, h4) + * { margin-top: 0.65em; }
.prose h2 { font-size: 1.5em; }
.prose h3 { font-size: 1.25em; }
.prose h4 { font-size: 1.1em; }
.prose a { color: #0a7a57; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--emerald); }
.prose strong { color: var(--text-strong); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { border-left: 3px solid var(--emerald); padding: 0.15em 0 0.15em 1.1em; font-family: var(--font-display); font-weight: 500; color: var(--text-strong); font-size: 1.15em; line-height: 1.5; letter-spacing: -0.01em; }
.prose blockquote em { font-style: normal; }
.prose img { border-radius: 4px; margin-inline: auto; }
.prose p:has(> img) + p > em:only-child { display: block; text-align: center; font-size: 0.82em; color: var(--text-muted); margin-top: -0.6em; }
.prose hr { border: 0; text-align: center; margin: 2.2em 0; }
.prose hr::before { content: "· · ·"; letter-spacing: 0.6em; color: var(--text-muted); }
.prose code { font-family: var(--font-mono); font-size: 0.82em; background: var(--paper-2); border: 1px solid var(--paper-line); padding: 0.1em 0.35em; border-radius: 5px; }
.prose pre { background: var(--ink); color: var(--on-dark); padding: 1.1em 1.3em; border-radius: 10px; overflow-x: auto; font-size: 0.85em; line-height: 1.6; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 1em; }
.prose .table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: 0.8em; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 0.6em 0.7em; text-align: left; }
.embed-video { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--ink); }
.embed-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.post-foot { margin-top: 2.4rem; }
.post-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; }
.post-tags li { font-family: var(--font-body); font-size: 0.92rem; letter-spacing: 0.04em; padding: 0.15rem 0.7rem; border: 1px solid var(--paper-line); border-radius: 999px; color: var(--text-muted); }
.post-original { margin-top: 1rem; font-size: 0.9rem; color: var(--text-muted); }
.post-original a { color: var(--text-strong); text-decoration: underline; }

.author-box { display: grid; grid-template-columns: 88px 1fr; gap: 1.2rem; margin-top: 2.2rem; padding: 1.5rem; background: var(--paper-2); border-radius: var(--radius); border: 1px solid var(--paper-line); }
.author-box-photo img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: top; }
.author-box-name { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; margin-top: 0.15rem; }
.author-box-name a:hover { color: var(--emerald); }
.author-box-role { font-size: 0.88rem; color: var(--emerald); font-weight: 600; margin-top: 0.1rem; }
.author-box-bio { font-size: 0.95rem; color: var(--text-muted); margin-top: 0.5rem; }
.author-box-link { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.8rem; font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; color: var(--emerald); }
.author-box-link svg { width: 1em; }

.post-more { max-width: 820px; padding-bottom: 1rem; }
.post-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 820px; padding-block: 2rem clamp(3rem, 6vw, 5rem); }
.pager-link { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.1rem 1.2rem; border: 1px solid var(--paper-line); border-radius: var(--radius-sm); transition: border-color 0.2s var(--ease); }
.pager-link:hover { border-color: var(--emerald); }
.pager-link span { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--condensed); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.pager-link span svg { width: 0.95rem; }
.pager-link b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.3; color: var(--text-strong); }
.pager-next { text-align: right; align-items: flex-end; grid-column: 2; }
body:has(.post) { background: var(--paper); }

@media (max-width: 600px) {
  .post-meta { flex-direction: column; align-items: flex-start; }
  .reader-label { display: none; }
  .author-box { grid-template-columns: 1fr; }
  .post-pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: auto; }
}

/* ==========================================================================
   Perfil profissional do autor
   ========================================================================== */
.profile-hero { position: relative; overflow: hidden; background: var(--ink); color: var(--on-dark); padding: calc(74px + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(3rem, 6vw, 4.5rem); }
.profile-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 340px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.profile-photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--ink-line); box-shadow: var(--shadow-lg); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.profile-intro h1 { color: #fff; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; font-size: clamp(2.6rem, 1.6rem + 4vw, 4.6rem); line-height: 1; margin-top: 0.8rem; }
.profile-tagline { color: var(--on-dark-muted); font-family: var(--font-body); font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); line-height: 1.5; margin-top: 1.1rem; max-width: 38rem; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.8rem; }
.profile-actions .btn { padding: 0.65rem 1.15rem; font-size: 0.9rem; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 0.8rem 2.4rem; margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--ink-line); }
.profile-stats div { display: flex; flex-direction: column-reverse; }
.profile-stats dd { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: #fff; }
.profile-stats dt { font-size: 0.82rem; color: var(--on-dark-muted); }

.profile-nav { position: sticky; top: 74px; z-index: 50; background: rgba(255,255,255,0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--paper-line); }
.profile-nav .wrap { display: flex; gap: 0.3rem; overflow-x: auto; scrollbar-width: none; }
.profile-nav a { flex: none; padding: 0.95rem 0.9rem; font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; color: var(--text-muted); border-bottom: 2px solid transparent; }
.profile-nav a:hover, .profile-nav a.active { color: var(--text-strong); border-bottom-color: var(--emerald); }
.profile-nav a span { font-size: 0.75rem; color: var(--emerald); margin-left: 0.15rem; }
.profile-hero ~ .section { scroll-margin-top: 130px; }

.profile-about { background: var(--paper); }
.profile-about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.profile-about h2, .profile-career h2, .profile-posts h2, .courses h2 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.6rem); margin-top: 0.8rem; }
.prose-profile { --reading-scale: 0.95; padding-top: 1.2rem; max-width: 640px; margin-inline: 0; }
.prose-profile > p:first-of-type { font-size: 1em; color: inherit; }
.profile-aside { background: var(--paper-2); border: 1px solid var(--paper-line); border-radius: var(--radius); padding: 1.6rem; position: sticky; top: 140px; }
.profile-aside h3 { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.profile-aside h3 + * { margin-top: 0.9rem; }
.profile-aside * + h3 { margin-top: 1.6rem; }
.award-photo { position: relative; margin: 0 0 1rem; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1; }
.award-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.award-photo figcaption { position: absolute; left: 0.7rem; bottom: 0.7rem; right: 0.7rem; width: fit-content; font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; color: #fff; background: rgba(7,12,23,0.72); padding: 0.3rem 0.7rem; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.award-photo .photo-credit { position: absolute; right: 0.6rem; top: 0.6rem; font-size: 0.68rem; color: rgba(255,255,255,0.85); background: rgba(7,12,23,0.55); padding: 0.2rem 0.5rem; border-radius: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; }
.chips li { font-size: 0.82rem; font-weight: 600; color: var(--text-strong); background: var(--paper); border: 1px solid var(--paper-line); padding: 0.3rem 0.7rem; border-radius: 999px; }
.awards { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.awards li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.94rem; font-weight: 500; color: var(--text-strong); }
.awards svg { width: 1.15rem; flex: none; color: #c99a00; margin-top: 0.1rem; }

.profile-career { background: var(--paper-2); }
.career-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem); margin-top: 2.4rem; }
.career-col-title { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.2rem; }
.timeline { list-style: none; padding: 0; border-left: 2px solid var(--paper-line); }
.timeline li { position: relative; padding: 0 0 1.5rem 1.5rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 0.35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--emerald); }
.timeline li:first-child::before { background: var(--emerald); }
.timeline-role { font-family: var(--font-display); font-weight: 600; color: var(--text-strong); font-size: 1.05rem; line-height: 1.3; }
.timeline-org { color: var(--emerald); font-weight: 600; font-size: 0.92rem; margin-top: 0.15rem; }
.timeline-text { color: var(--text-muted); font-size: 0.94rem; margin-top: 0.3rem; }
.timeline .status { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; color: #8a6d00; background: rgba(245,197,24,0.18); padding: 0.1rem 0.5rem; border-radius: 999px; vertical-align: middle; }
.timeline-edu li::before { border-color: var(--gold); }
.timeline-edu li:first-child::before { background: var(--gold); }

.profile-courses { margin-top: 2.2rem; grid-template-columns: repeat(auto-fill, minmax(240px, 300px)); }
.profile-posts { background: var(--paper); }
.profile-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.5rem; }
.profile-section-head .btn svg { width: 1em; }
.talks .profile-section-head h2 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.6rem); margin-top: 0.8rem; }
.talks-more { margin-top: 1.6rem; text-align: center; }
.talks-lead { color: var(--on-dark-muted); margin-top: -0.6rem; }
.talks .rail-head { margin-top: 1rem; }
.talks .rail-events { margin-top: 0.4rem; }
.talks-more a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--emerald-bright); font-family: var(--font-display); font-weight: 600; }
.talks-more svg { width: 1em; }
.press h2 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.6rem); margin-top: 0.8rem; }

@media (max-width: 960px) {
  .profile-hero-inner { grid-template-columns: 1fr; }
  .profile-photo { max-width: 260px; }
  .profile-about-grid, .career-grid { grid-template-columns: 1fr; }
  .profile-aside { position: static; }
}
