/*
 * Layout canônico para páginas internas do portfólio.
 * Projetos e Contato usam a mesma régua visual das demais páginas,
 * sem depender de hidratação do CMS ou de overrides carregados depois.
 */

:root {
  --ls-internal-page-start: clamp(52px, 4.5vw, 68px);
  --ls-internal-page-start-mobile: 42px;

  /* Escala tipográfica canônica do portfólio. */
  --ls-page-title-size: clamp(1.9rem, 2.2vw, 2.15rem);
  --ls-page-description-size: 1rem;
  --ls-section-title-size: 1.45rem;
  --ls-card-title-size: 1rem;
  --ls-card-body-size: .95rem;
  --ls-label-size: .78rem;
  --ls-small-size: .72rem;
  --ls-body-line-height: 1.65;
  --ls-section-transition-gap: clamp(58px, 6vw, 84px);
}

html body:not(.admin-body) main > section.page-hero,
html body:not(.admin-body) main > section.about-showcase,
html body:not(.admin-body) main > section.competencies-showcase {
  padding-top: var(--ls-internal-page-start) !important;
}

/*
 * Tipografia das páginas internas novas.
 * Mantém a mesma proporção usada em todas as telas:
 * título principal, descrição, títulos de seção e conteúdo de cards.
 */
.projects-page .page-title,
.contact-page .page-title {
  font-size: var(--ls-page-title-size) !important;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.projects-page .page-description,
.contact-page .page-description {
  font-size: var(--ls-page-description-size) !important;
  line-height: var(--ls-body-line-height) !important;
}

.projects-page .section-title,
.projects-page .projects-contact-strip__inner h2,
.contact-page .contact-card-heading h2,
.contact-page .contact-direct-card h2 {
  font-size: var(--ls-section-title-size) !important;
  line-height: 1.2;
  letter-spacing: -.03em;
}

.projects-page .projects-page-hero__pillar strong,
.contact-page .contact-availability-card strong,
.contact-page .contact-direct-list a strong {
  font-size: var(--ls-card-title-size) !important;
}

.projects-page .projects-page-hero__pillar p,
.projects-page .projects-contact-strip__inner p,
.contact-page .contact-availability-card p,
.contact-page .contact-card-heading p,
.contact-page .contact-direct-card > p {
  font-size: var(--ls-card-body-size) !important;
}

.projects-page .section-kicker,
.contact-page .section-kicker,
.contact-page .contact-form-card .field label {
  font-size: var(--ls-label-size) !important;
}

.projects-page-hero,
.contact-page-hero {
  padding-bottom: clamp(44px, 5vw, 72px);
}

.projects-page-hero__grid,
.contact-page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.projects-page-hero__copy,
.contact-page-hero__copy {
  max-width: 760px;
}

.projects-page-hero .page-title,
.contact-page-hero .page-title {
  max-width: 760px;
  margin-top: 16px;
}

.projects-page-hero .page-description,
.contact-page-hero .page-description {
  max-width: 700px;
  margin-top: 20px;
}

/* Projetos: abertura centralizada e três pilares lado a lado. */
.projects-page-hero__grid {
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 44px);
}

.projects-page-hero__copy {
  width: 100%;
  max-width: none;
  text-align: center;
}

.projects-page-hero .page-title {
  max-width: 980px;
  margin: 20px auto 0;
  text-align: center;
}

.projects-page-hero .page-description {
  max-width: 920px;
  margin: 20px auto 0;
  text-align: center;
}

/* Projetos */
.projects-page-hero__pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.projects-page-hero__pillar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--theme-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--theme-surface-strong) 88%, transparent);
  box-shadow: var(--theme-shadow-soft);
}

.projects-page-hero__pillar > span {
  font-family: var(--portfolio-font-mono, ui-monospace, monospace);
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--theme-muted);
}

.projects-page-hero__pillar strong {
  display: block;
  color: var(--theme-text);
}

.projects-page-hero__pillar p {
  margin: 5px 0 0;
  color: var(--theme-muted);
  line-height: 1.55;
}

/* Projetos: mantém os pilares e o catálogo visualmente próximos. */
.projects-page .projects-page-hero {
  padding-bottom: 16px !important;
}

.projects-page .projects-catalog--integrated {
  margin-top: 16px !important;
  padding-top: 0 !important;
  border-top: 0 !important;
  background-image: none !important;
}

.projects-filter-bar {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.projects-filters {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.projects-filter-tools {
  display: flex;
  align-items: end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
}

.projects-filter-control {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.projects-filter-control--tech {
  min-width: min(260px, 100%);
}

.projects-filter-control > span {
  color: var(--theme-muted);
  font-family: var(--font-ui, Manrope, sans-serif);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.projects-filter-control select {
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--theme-border);
  border-radius: 10px !important;
  background: color-mix(in srgb, var(--theme-surface-strong) 92%, transparent);
  color: var(--theme-text);
  font-family: var(--font-ui, Manrope, sans-serif);
  font-size: .78rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.projects-filter-control select:focus {
  border-color: var(--theme-accent-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent-2) 14%, transparent);
}

.projects-filter-results {
  margin-left: auto;
  padding-bottom: 10px;
  color: var(--theme-muted);
  font-family: var(--font-technical, 'IBM Plex Mono', monospace);
  font-size: .7rem;
  white-space: nowrap;
}

.projects-page-grid {
  margin-top: 28px;
  min-height: 420px;
}

.projects-page-grid .project-card {
  height: 100%;
}

.projects-page-grid .project-card[hidden] {
  display: none !important;
}

.projects-contact-strip {
  padding-top: 0 !important;
}

.projects-contact-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--theme-border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--theme-surface-strong) 90%, transparent);
  box-shadow: var(--theme-shadow-soft);
}

.projects-contact-strip__inner h2 {
  margin: 10px 0 8px;
  color: var(--theme-text);
}

.projects-contact-strip__inner p {
  margin: 0;
  color: var(--theme-muted);
}

.projects-contact-strip__inner .btn {
  flex: 0 0 auto;
}

/* Contato */
.contact-availability-card {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 16px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--theme-border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--theme-surface-strong) 90%, transparent);
  box-shadow: var(--theme-shadow-soft);
}

.contact-availability-card__dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #5f8f73;
  box-shadow: 0 0 0 6px color-mix(in srgb, #5f8f73 16%, transparent);
}

.contact-availability-card strong {
  display: block;
  margin-top: 10px;
  color: var(--theme-text);
  line-height: 1.42;
}

.contact-availability-card p {
  margin: 12px 0 0;
  color: var(--theme-muted);
}

.contact-section {
  border-top: 1px solid var(--theme-border);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(22px, 3vw, 34px);
  align-items: start;
}

.contact-form-card,
.contact-direct-card {
  border: 1px solid var(--theme-border);
  border-radius: 22px;
  background: color-mix(in srgb, var(--theme-surface-strong) 90%, transparent);
  box-shadow: var(--theme-shadow-soft);
}

.contact-form-card {
  padding: clamp(24px, 4vw, 40px);
}

.contact-direct-card {
  padding: clamp(24px, 3vw, 32px);
}

.contact-card-heading {
  margin-bottom: 26px;
}

.contact-card-heading h2,
.contact-direct-card h2 {
  margin: 10px 0 8px;
  color: var(--theme-text);
}

.contact-card-heading p,
.contact-direct-card > p {
  margin: 0;
  color: var(--theme-muted);
  line-height: 1.65;
}

.contact-form-card .form {
  display: grid;
  gap: 18px;
}

.contact-form-card .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-form-card .field {
  display: grid;
  gap: 7px;
}

.contact-form-card .field label {
  color: var(--theme-text);
  font-weight: 700;
}

.contact-form-card .field input,
.contact-form-card .field textarea {
  width: 100%;
  border: 1px solid var(--theme-border-strong);
  border-radius: 14px;
  color: var(--theme-text);
  background: color-mix(in srgb, var(--theme-surface) 88%, transparent);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.contact-form-card .field input {
  min-height: 50px;
  padding: 0 15px;
}

.contact-form-card .field textarea {
  min-height: 150px;
  padding: 14px 15px;
  resize: vertical;
}

.contact-form-card .field input::placeholder,
.contact-form-card .field textarea::placeholder {
  color: color-mix(in srgb, var(--theme-muted) 72%, transparent);
}

.contact-form-card .field input:focus,
.contact-form-card .field textarea:focus {
  border-color: var(--theme-accent-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent-2) 16%, transparent);
  background: var(--theme-surface-strong);
}

.contact-form-card .btn {
  justify-self: start;
  margin-top: 2px;
}

.contact-direct-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.contact-direct-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid var(--theme-border);
  border-radius: 14px;
  color: var(--theme-text);
  background: color-mix(in srgb, var(--theme-surface-muted) 64%, transparent);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}

.contact-direct-list a:hover {
  transform: translateY(-2px);
  border-color: var(--theme-border-strong);
  background: color-mix(in srgb, var(--theme-surface-muted) 82%, transparent);
}

.contact-direct-list a span {
  grid-column: 1;
  color: var(--theme-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.contact-direct-list a strong {
  grid-column: 1;
  overflow-wrap: anywhere;
}

.contact-direct-list a i {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--theme-muted);
  font-style: normal;
}

/* =========================================================
   SISTEMA TIPOGRÁFICO ÚNICO DO PORTFÓLIO
   ========================================================= */

/* Rótulos/eyebrows: mesma escala em todas as telas. */
html body:not(.admin-body) .section-kicker {
  font-size: .86rem !important;
  line-height: 1.2 !important;
}

html body:not(.admin-body) .about-label,
html body:not(.admin-body) .about-edu > span,
html body:not(.admin-body) .about-edu-date,
html body:not(.admin-body) .cpx-group,
html body:not(.admin-body) .hero-sector-label {
  font-size: var(--ls-label-size) !important;
  line-height: 1.2 !important;
}

/* Títulos principais das páginas internas. */
html body:not(.admin-body) main .page-title,
html body:not(.admin-body) main .about-title,
html body:not(.admin-body) main .cpx-title {
  font-family: var(--font-ui, Manrope, Inter, sans-serif) !important;
  font-size: var(--ls-page-title-size) !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
  letter-spacing: -.04em !important;
}

/* Textos de abertura / descrições principais. */
html body:not(.admin-body) main .page-description,
html body:not(.admin-body) main .about-lead,
html body:not(.admin-body) main .cpx-desc,
html body:not(.admin-body) main .section-description,
html body:not(.admin-body) main .resume-summary {
  font-size: var(--ls-page-description-size) !important;
  line-height: var(--ls-body-line-height) !important;
}

/* Títulos de seção. */
html body:not(.admin-body) main .section-title,
html body:not(.admin-body) main .about-side h2,
html body:not(.admin-body) main .about-objective h2,
html body:not(.admin-body) main .about-section-head h2,
html body:not(.admin-body) main .about-goals h2,
html body:not(.admin-body) main .cpx-level-head h2,
html body:not(.admin-body) main .contact-card-heading h2,
html body:not(.admin-body) main .contact-direct-card h2,
html body:not(.admin-body) main .projects-contact-strip__inner h2,
html body:not(.admin-body) main .resume-section__head h2,
html body:not(.admin-body) main .quote-panel h2 {
  font-family: var(--font-ui, Manrope, Inter, sans-serif) !important;
  font-size: var(--ls-section-title-size) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -.03em !important;
}

/* Títulos de cards e blocos. */
html body:not(.admin-body) main .project-card h3,
html body:not(.admin-body) main .about-edu h3,
html body:not(.admin-body) main .cpx-skill-title,
html body:not(.admin-body) main .cpx-card--big .cpx-skill-title,
html body:not(.admin-body) main .cpx-level-card .cpx-skill-title,
html body:not(.admin-body) main .cert-card h3,
html body:not(.admin-body) main .home-method__item h3,
html body:not(.admin-body) main .projects-page-hero__pillar strong,
html body:not(.admin-body) main .contact-availability-card strong,
html body:not(.admin-body) main .contact-direct-list a strong,
html body:not(.admin-body) main .resume-section h3 {
  font-family: var(--font-ui, Manrope, Inter, sans-serif) !important;
  font-size: var(--ls-card-title-size) !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: -.015em !important;
}

/* Cargo nas experiências é um título de seção dentro do card. */
html body:not(.admin-body) main .timeline-card h3 {
  font-size: var(--ls-section-title-size) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -.03em !important;
}

/* Corpo textual: uma única escala de leitura. */
html body:not(.admin-body) main .project-card p,
html body:not(.admin-body) main .timeline-card p,
html body:not(.admin-body) main .timeline-card li,
html body:not(.admin-body) main .about-side p,
html body:not(.admin-body) main .about-section-head p,
html body:not(.admin-body) main .about-edu p,
html body:not(.admin-body) main .about-goals li,
html body:not(.admin-body) main .cpx-skill-desc,
html body:not(.admin-body) main .cpx-card--big .cpx-skill-desc,
html body:not(.admin-body) main .cpx-level-card .cpx-skill-desc,
html body:not(.admin-body) main .cpx-level-head p,
html body:not(.admin-body) main .cert-card p,
html body:not(.admin-body) main .quote-panel p,
html body:not(.admin-body) main .home-method__item p,
html body:not(.admin-body) main .projects-page-hero__pillar p,
html body:not(.admin-body) main .projects-contact-strip__inner p,
html body:not(.admin-body) main .contact-availability-card p,
html body:not(.admin-body) main .contact-card-heading p,
html body:not(.admin-body) main .contact-direct-card > p,
html body:not(.admin-body) main .resume-section p,
html body:not(.admin-body) main .resume-section li,
html body:not(.admin-body) main .resume-sidebar p,
html body:not(.admin-body) main .resume-sidebar li {
  font-size: var(--ls-card-body-size) !important;
  line-height: var(--ls-body-line-height) !important;
}

/* Home: preserva o display do nome, mas usa a mesma régua no conteúdo. */
html body.home-page-v2 main .home-projects-section .section-title,
html body.home-page-v2 main .home-method__header h2,
html body.home-page-v2 main .home-contact-cta__title {
  font-size: var(--ls-page-title-size) !important;
  font-weight: 700 !important;
  line-height: 1.12 !important;
  letter-spacing: -.04em !important;
}

html body.home-page-v2 main .section-description,
html body.home-page-v2 main .home-method__intro,
html body.home-page-v2 main .home-contact-cta__description,
html body.home-page-v2 main .home-hero-v2__description {
  font-size: var(--ls-page-description-size) !important;
  line-height: var(--ls-body-line-height) !important;
}

html body.home-page-v2 main .home-method__item h3,
html body.home-page-v2 main .project-card h3 {
  font-size: var(--ls-card-title-size) !important;
  line-height: 1.3 !important;
}

html body.home-page-v2 main .home-method__item p,
html body.home-page-v2 main .project-card p {
  font-size: var(--ls-card-body-size) !important;
  line-height: var(--ls-body-line-height) !important;
}

/* Chips e metadados continuam menores, mas também padronizados. */
html body:not(.admin-body) main .about-chips span,
html body:not(.admin-body) main .cpx-chips span,
html body:not(.admin-body) main .cpx-level-badge,
html body:not(.admin-body) main .cpx-summary span,
html body:not(.admin-body) main .chip,
html body:not(.admin-body) main .tech-list span {
  font-size: var(--ls-small-size) !important;
}

@media (max-width: 900px) {
  .projects-page-hero__grid,
  .contact-page-hero__grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .projects-page-hero__pillar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .projects-page-hero__pillars {
    grid-template-columns: 1fr;
  }

  .projects-filter-tools {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .projects-filter-control,
  .projects-filter-control--tech {
    flex: 1 1 180px;
    min-width: 0;
  }

  .projects-filter-results {
    width: 100%;
    margin-left: 0;
    padding: 2px 0 0;
  }

  .projects-contact-strip__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-form-card .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --ls-page-title-size: 1.8rem;
    --ls-section-title-size: 1.3rem;
    --ls-card-body-size: .94rem;
  }

  html body:not(.admin-body) main > section.page-hero,
  html body:not(.admin-body) main > section.about-showcase,
  html body:not(.admin-body) main > section.competencies-showcase {
    padding-top: var(--ls-internal-page-start-mobile) !important;
  }

  .projects-page-hero,
  .contact-page-hero {
    padding-bottom: 38px;
  }

  .projects-page-hero__grid,
  .contact-page-hero__grid {
    gap: 28px;
  }

  .projects-page-grid {
    min-height: 300px;
  }

  .projects-filter-control,
  .projects-filter-control--tech {
    flex-basis: 100%;
  }

  .contact-form-card,
  .contact-direct-card,
  .contact-availability-card {
    border-radius: 18px;
  }
}
/* =========================================================
   PADRÃO CANÔNICO DE ABERTURA CENTRALIZADA
   Título/selo entre linhas, texto e controles centralizados.
   ========================================================= */
html body:not(.admin-body) .portfolio-centered-heading {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(18px, 2.5vw, 34px) !important;
  width: 100% !important;
  text-align: center !important;
}

html body:not(.admin-body) .portfolio-centered-heading__line {
  display: block;
  flex: 1 1 0;
  min-width: 40px;
  height: 1px;
  background: color-mix(in srgb, var(--theme-text-soft, #5B6474) 24%, transparent);
}

html body:not(.admin-body) .portfolio-centered-heading .section-kicker {
  flex: 0 0 auto;
  margin-inline: 0 !important;
  white-space: nowrap;
}

html body:not(.admin-body) .portfolio-centered-copy {
  width: 100% !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

html body:not(.admin-body) .portfolio-centered-controls {
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

/* Experiências adota o mesmo padrão centralizado da abertura de Projetos. */
html body:not(.admin-body) .experience-hero .experience-hero-inner {
  width: min(1280px, calc(100% - 48px));
  max-width: 1280px !important;
  text-align: center;
}

html body:not(.admin-body) .experience-hero .experience-hero-copy {
  width: 100%;
  max-width: none !important;
}

html body:not(.admin-body) .experience-hero .page-description.portfolio-centered-copy {
  max-width: 1180px !important;
  margin-top: 20px !important;
  margin-bottom: 0 !important;
  color: var(--theme-text-soft, #52637a);
}

html body:not(.admin-body) .experience-hero .timeline-sector-area {
  width: 100%;
  text-align: center;
}

html body:not(.admin-body) .experience-hero .hero-sector-block {
  width: 100%;
  max-width: 1180px;
  margin: 28px auto 0;
}

html body:not(.admin-body) .experience-hero .hero-sector-label {
  text-align: center;
}

html body:not(.admin-body) .experience-hero .hero-sector-tags {
  justify-content: center;
}

html body:not(.admin-body) .experience-hero .hero-actions {
  justify-content: center;
}

@media (max-width: 720px) {
  html body:not(.admin-body) .portfolio-centered-heading {
    gap: 14px !important;
  }

  html body:not(.admin-body) .portfolio-centered-heading__line {
    min-width: 28px;
  }

  html body:not(.admin-body) .experience-hero .experience-hero-inner {
    width: min(100% - 28px, 1280px);
  }
}

/* Competências: subseções usam o mesmo padrão linha | selo | linha. */
.competencies-showcase .home-technologies__heading {
  width: 100%;
  max-width: none;
  text-align: center;
}

.competencies-showcase .home-technologies__heading > p {
  max-width: 760px;
  margin: 14px auto 0;
  text-align: center;
}

.competencies-showcase .competencies-section-heading {
  width: 100%;
}

html body:not(.admin-body) .competencies-showcase .cpx-level-section {
  border-top: 0 !important;
  background-image: none !important;
}

.competencies-showcase .cpx-level-section > .competencies-section-heading {
  margin-bottom: 18px;
}

.competencies-showcase .cpx-level-head h2 {
  margin-top: 0;
}

/* Estrutura opcional do projeto: referência Uiverse adaptada ao portfólio */
.project-structure {
  position: relative;
  z-index: 4;
}

.project-structure__trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: min(100%, 280px);
  padding: 12px 16px;
  border: 1px solid var(--theme-border, #D9E0E7);
  border-radius: 12px;
  background: var(--theme-surface-strong, #FFFFFF);
  box-shadow: 0 12px 30px rgba(13, 26, 52, .09);
  color: var(--theme-text, #0D1A34);
  cursor: pointer;
  outline: none;
}

.project-structure__trigger > div:not(.project-structure__popover) {
  display: grid;
  gap: 2px;
}

.project-structure__trigger strong {
  font-family: var(--font-ui, Manrope, sans-serif);
  font-size: 1rem;
  line-height: 1.25;
}

.project-structure__trigger small {
  color: var(--theme-text-soft, #5B6474);
  font-size: .75rem;
}

.project-structure__folder {
  flex: 0 0 25px;
}

.project-structure__chevron {
  margin-left: auto;
  color: var(--theme-text-soft, #5B6474);
  transition: transform .22s ease;
}

.project-structure__popover {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 12;
  width: min(360px, calc(100vw - 48px));
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--theme-border, #D9E0E7);
  border-radius: 14px;
  background: var(--theme-surface-strong, #FFFFFF);
  box-shadow: 0 22px 54px rgba(13, 26, 52, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity .24s ease, transform .24s ease, visibility .24s;
  pointer-events: none;
}

.project-structure__trigger:is(:hover, :focus, :focus-within) .project-structure__popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.project-structure__trigger:is(:hover, :focus, :focus-within) .project-structure__chevron {
  transform: rotate(180deg);
}

.project-structure__tree {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-structure__item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 8px 5px calc(8px + (var(--structure-level, 0) * 18px));
  border-radius: 8px;
  color: var(--theme-text, #0D1A34);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: .82rem;
  line-height: 1.35;
}

.project-structure__item:hover {
  background: color-mix(in srgb, #9487E9 9%, transparent);
}

.project-structure__icon {
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
  font-family: sans-serif;
}

html[data-theme="dark"] .project-structure__trigger,
html[data-theme="dark"] .project-structure__popover {
  background: var(--theme-surface-strong, #263142);
  border-color: var(--theme-border, #3D485C);
}

@media (max-width: 640px) {
  .project-structure__trigger {
    width: 100%;
  }

  .project-structure__popover {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-structure__popover,
  .project-structure__chevron {
    transition: none;
  }
}

/* Projetos: CTA final segue o padrão centralizado do portfólio. */
.projects-page .projects-contact-strip__inner {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
}

.projects-page .projects-contact-strip__inner > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.projects-page .projects-contact-strip__inner .section-kicker {
  margin-inline: auto;
}

.projects-page .projects-contact-strip__inner h2 {
  max-width: 760px;
  margin: 16px auto 8px;
  text-align: center;
}

.projects-page .projects-contact-strip__inner p {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.projects-page .projects-contact-strip__inner .btn {
  margin-top: 24px;
  align-self: center;
}

@media (max-width: 700px) {
  .projects-page .projects-contact-strip__inner {
    align-items: center;
  }
}
