/* /publications/css/style3.css */
:root{
  --bg: #060612;
  --ink: #e9ecff;
  --muted: #b8c0ff;

  --cern: #00e5ff;
  --sapho: #ff8a00;
  --sc: #b388ff;

  --diagram-shift: -120px;
  --page-max: 1040px;
  --pad-x: clamp(14px, 3vw, 22px);
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html{
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body{
  height: 100%;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

/* ===== FUNDO ESTRELADO ===== */
#stars{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: transparent;
  pointer-events: none;
}

/* ===== CABEÇALHO ===== */
.header{
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 40px;
  height: 110px;
  background: rgba(6, 6, 18, 0.65);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.25);
  z-index: 10;
}

.logo-container{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo-fa{
  display: inline-flex;
  font-size: 2.2rem;
  line-height: 1;
  color: #e9ecff;
  filter: drop-shadow(0 0 6px rgba(180,200,255,.35));
}

.site-subtitle{
  font-size: 1.6rem;
  color: #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-nav{
  display: flex;
  align-items: center;
}

.header .home-link{
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
}
.header .home-fa{
  font-size: 2.2rem; /* igual ao logo-fa */
  color: #cfe9ff;
  opacity: .9;
  line-height: 1;

  transition: transform .2s ease, opacity .2s ease, text-shadow .2s ease;
}

.header .home-link:hover .home-fa{
  opacity: 1;
  transform: scale(1.12);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.55);
}

/* ===== CONTEÚDO GERAL ===== */
main{
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 220px);
  padding-top: 90px;
  padding-bottom: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== HOME — TÍTULO + EFEITO (FINAL) ===== */
.titulo-diagrama{
  position: relative;
  top: 87px;
  text-align: left;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 30px;
  color: var(--ink);
  z-index: 3;

  display: inline-block;
  will-change: text-shadow;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.titulo-diagrama .cern-text{
  color: var(--cern);
  text-shadow: 0 0 14px rgba(0, 229, 255, 0.55);
}
.titulo-diagrama .sapho-text{
  color: var(--sapho);
  text-shadow: 0 0 14px rgba(255, 138, 0, 0.55);
}

.titulo-diagrama.fx-glint{
  position: relative;
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  animation: glint-in 520ms ease-out 90ms forwards;
  will-change: opacity, transform;
}

.titulo-diagrama.fx-glint::after{
  content: "";
  position: absolute;
  inset: -6px -10px;
  pointer-events: none;

  background: linear-gradient(110deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.0) 35%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0.0) 65%,
    rgba(255,255,255,0) 100%
  );
  transform: translateX(-120%);
  opacity: 0;

  mix-blend-mode: screen;
  filter: blur(0.2px);
  animation: glint-sweep 780ms ease-in-out 260ms forwards;
  -webkit-mask: linear-gradient(#000, #000);
}

@keyframes glint-in{ to{ opacity: 1; transform: translateY(0); } }
@keyframes glint-sweep{
  0%{ transform: translateX(-120%); opacity: 0; }
  20%{ opacity: 1; }
  70%{ opacity: 1; }
  100%{ transform: translateX(120%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce){
  .titulo-diagrama.fx-glint{ opacity: 1; transform: none; animation: none; }
  .titulo-diagrama.fx-glint::after{ display: none; }
}

/* ===== HOME — DIAGRAMA ===== */
.diagram{
  position: relative;
  width: 700px;
  height: 650px;
  z-index: 2;
  transform: translateX(var(--diagram-shift));
  top: 90px;
}

.circle{
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  opacity: 0.9;
  border: 3px solid transparent;
  transition: transform 0.4s ease, box-shadow 0.6s ease;
  text-decoration: none;
}

.sapho{
  border-color: var(--sapho);
  box-shadow: 0 0 60px var(--sapho);
  left: 150px;
  top: 160px;
}
.cern{
  border-color: var(--cern);
  box-shadow: 0 0 60px var(--cern);
  left: 420px;
  top: 160px;
}
.circle:hover{
  transform: scale(1.04);
  box-shadow: 0 0 40px currentColor;
}

.intersection{
  position: absolute;
  z-index: 6;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.link-intersection{
  text-decoration: none;
  font-size: 1.3rem;
}
.sc{
  left: 455px;
  top: 330px;
  transform: translate(-50%, -50%);
}
.s, .c{
  color: #ffffff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

/* =========================================================
   HUB — FILTROS + LISTA
   ========================================================= */
.pubs-hub{
  max-width: 1040px;
  margin: 40px auto 120px;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}
.pubs-title{ text-align: center; margin: 0 0 14px; }

.pubs-filters{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 14px auto 18px;
}

.filter-block{
  width: 100%;
  display: flex;
  justify-content: center;
}

.filter-line{
  width: 100%;
  max-width: 920px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: 16px;
}

.filters-label{
  width: 70px;
  flex: 0 0 70px;
  text-align: right;
  letter-spacing: .16em;
  opacity: .75;
  font-size: 12px;
}

.filter-row,
.search-row{
  flex: 1;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search-row{ width: 100%; }

/* =========================================================
   CHIPS
   ========================================================= */
.chip{
  border: 1px solid rgba(120,200,255,.35);
  background: rgba(6,6,18,.35);
  color: #e9ecff;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;

  font-weight: 700;
  letter-spacing: .04em;
  transition: transform .15s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}

.chip:hover{
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 16px rgba(255,255,255,.10);
  transform: translateY(-1px);
}

.chip:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 2px rgba(255,255,255,.14),
    0 0 0 6px rgba(0,229,255,.12);
}

/* padrão para filtros que NÃO são eixo */
.chip.is-active{
  color: #ffffff;
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.10);
  box-shadow:
    0 0 0 2px rgba(255,255,255,.18),
    0 0 18px rgba(255,255,255,.14),
    0 0 34px rgba(255,255,255,.08);
}

/* EIXO — cores fortes */
#filterEixo .chip.is-active[data-eixo="all"]{
  border-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.06);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.18),
    0 0 12px rgba(255,255,255,.12);
}

#filterEixo .chip.is-active[data-eixo="sapho"]{
  border-color: rgba(255,138,0,.80);
  background: rgba(255,138,0,.14);
  box-shadow:
    0 0 0 2px rgba(255,138,0,.22),
    0 0 22px rgba(255,138,0,.22),
    0 0 46px rgba(255,138,0,.14);
}

#filterEixo .chip.is-active[data-eixo="cern"]{
  border-color: rgba(0,229,255,.80);
  background: rgba(0,229,255,.14);
  box-shadow:
    0 0 0 2px rgba(0,229,255,.22),
    0 0 22px rgba(0,229,255,.22),
    0 0 46px rgba(0,229,255,.14);
}

#filterEixo .chip.is-active[data-eixo="sc"]{
  border-color: rgba(179,136,255,.82);
  background: rgba(179,136,255,.14);
  box-shadow:
    0 0 0 2px rgba(179,136,255,.22),
    0 0 22px rgba(179,136,255,.22),
    0 0 46px rgba(179,136,255,.14);
}

/* hover “dá pista” da cor */
#filterEixo .chip:not(.is-active)[data-eixo="sapho"]:hover{
  border-color: rgba(255,138,0,.55);
  box-shadow: 0 0 18px rgba(255,138,0,.14);
}
#filterEixo .chip:not(.is-active)[data-eixo="cern"]:hover{
  border-color: rgba(0,229,255,.55);
  box-shadow: 0 0 18px rgba(0,229,255,.14);
}
#filterEixo .chip:not(.is-active)[data-eixo="sc"]:hover{
  border-color: rgba(179,136,255,.55);
  box-shadow: 0 0 18px rgba(179,136,255,.14);
}

/* FAVORITOS chip */
#favOnlyBtn.chip-star.is-active{
  border-color: #ffd24a;
  background: rgba(255, 210, 74, 0.14);
  box-shadow:
    0 0 0 2px rgba(255, 210, 74, 0.35),
    0 0 22px rgba(45, 226, 196, 0.22),
    0 0 46px rgba(45, 226, 196, 0.14);
}

#favOnlyBtn.chip-star.is-active i{
  color: #ffd24a;
  text-shadow: 0 0 10px rgba(255, 210, 74, .35);
}

.chip-star{
  width: 44px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.chip-tese{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* BUSCA */
#pubSearch{
  width: min(560px, 100%);
  padding: 12px 14px;
  border-radius: 14px;

  border: 1px solid rgba(255,255,255,.38);
  background: rgba(6,6,18,.35);
  color: #e9ecff;

  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#pubSearch:focus{
  border-color: rgba(255,255,255,.65);
  box-shadow: 0 0 18px rgba(255,255,255,.18);
}

.results-bar{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 8px 0 18px;
  opacity: .9;
  flex-wrap: wrap;
}

.pubs-grid{
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(920px, 100%);
  margin: 0 auto;
}

/* CARDS */
.pub-card{
  position: relative;
  width: 100%;
  border: 1px solid rgba(120,200,255,.25);
  background: rgba(6,6,18,.35);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
  transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease;
}
.pub-card:hover{ transform: translateY(-2px); }

.pub-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}
.pub-badge{ font-size: 12px; letter-spacing: .12em; opacity: .85; }
.pub-title{ margin: 6px 0 8px; font-size: 16px; line-height: 1.25; }
.pub-meta{ margin: 0 0 6px; opacity: .85; }
.pub-veic{ margin: 0 0 6px; opacity: .85; }
.pub-resumo{ margin: 8px 0 0; opacity: .9; line-height: 1.45; }

.pub-actions{ margin-top: 12px; display: flex; gap: 10px; }

.pub-open{
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(120,200,255,.25);
  text-decoration: none;
  color: #e9ecff;
}

.pub-open i{ color: #ffffff; font-size: .95em; opacity: .9; }
.pub-open:hover i{ opacity: 1; }

.no-results{ text-align: center; opacity: .75; padding: 24px; }

/* Favoritos */
.fav-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,255,.28);
  background: rgba(6,8,30,.55);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.fav-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(129,140,248,.22);
}
.fav-btn i{ font-size: 1.05rem; color: rgba(233,236,255,.75); }
.fav-btn.is-fav i{ color: #ffcc33; }

/* Glow por eixo */
.pub-card[data-eixo="sapho"]:hover{
  border-color: rgba(255, 138, 0, 0.65);
  box-shadow:
    0 0 0 2px rgba(255, 138, 0, 0.18),
    0 0 22px rgba(255, 138, 0, 0.35),
    0 18px 48px rgba(0,0,0,0.55);
}
.pub-card[data-eixo="cern"]:hover{
  border-color: rgba(0, 229, 255, 0.65);
  box-shadow:
    0 0 0 2px rgba(0, 229, 255, 0.18),
    0 0 22px rgba(0, 229, 255, 0.35),
    0 18px 48px rgba(0,0,0,0.55);
}
.pub-card[data-eixo="sc"]:hover,
.pub-card[data-eixo="cs"]:hover{
  border-color: rgba(179, 136, 255, 0.65);
  box-shadow:
    0 0 0 2px rgba(179, 136, 255, 0.18),
    0 0 22px rgba(179, 136, 255, 0.35),
    0 18px 48px rgba(0,0,0,0.55);
}

/* Tooltip — SC */
.has-tooltip{ position: relative; }

.has-tooltip::after{
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  padding: 6px 10px;
  border-radius: 10px;

  background: rgba(10, 12, 28, 0.95);
  border: 1px solid rgba(179,136,255,0.45);
  color: #e9ecff;

  font-size: 11px;
  letter-spacing: .12em;
  white-space: nowrap;

  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 0 18px rgba(179,136,255,0.35);
}
.has-tooltip:hover::after{
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ===============================
   Dropdown de ANO (2 colunas)
   =============================== */
.year-dd{ position: relative; width: 220px; }

#yearSelect.year-select,
.year-select,
select[hidden]{
  display: none !important;
}

.year-dd-btn{
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 12px 14px;
  border-radius: 14px;

  border: 1px solid rgba(255,255,255,.38);
  background: rgba(6,6,18,.55);
  color: #e9ecff;

  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;

  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.year-dd-btn:hover{
  border-color: rgba(255,255,255,.65);
  box-shadow: 0 0 18px rgba(255,255,255,.18);
}

.year-dd-menu{
  display: none;
  margin-top: 10px;

  background: rgba(15, 20, 45, 0.98);
  border: 1px solid rgba(0,229,255,0.25);
  box-shadow: 0 24px 70px rgba(0,0,0,0.75);
  backdrop-filter: blur(12px);

  border-radius: 16px;
  padding: 12px;

  position: absolute;
  left: 0;
  z-index: 999;
}
.year-dd.is-open .year-dd-menu{ display: block; }

.year-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 6px;
}

.year-item{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: #eef2ff;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  font-weight: 700;
  letter-spacing: .06em;
}

.year-item:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.45);
  box-shadow: 0 0 14px rgba(255,255,255,0.14);
}

.year-item.is-active{
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.75);
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.20),
    0 0 12px rgba(255,255,255,0.16);
}

/* ===============================
   SUBMENU TESE — FIXED
   =============================== */
#submenuTese{
  display: none;
  min-width: 280px;
  padding: 14px;
  border-radius: 18px;

  background: rgba(10, 12, 28, 0.96);
  border: 1px solid rgba(0,229,255,0.22);
  box-shadow: 0 26px 80px rgba(0,0,0,0.70);
  backdrop-filter: blur(12px);

  position: fixed;
  z-index: 2147483647;
}
#submenuTese.is-open{ display: block; }

.submenu-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.submenu-item{
  width: 100%;
  text-align: left;

  background: rgba(40, 45, 75, 0.95);
  border: 1px solid rgba(140, 160, 255, 0.35);
  color: #f3f6ff;

  border-radius: 16px;
  padding: 12px 14px;

  font-weight: 800;
  letter-spacing: 0.05em;

  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.submenu-item:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.45);
  box-shadow: 0 0 14px rgba(255,255,255,0.16);
}

.submenu-item.is-active{
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.75);
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.22),
    0 0 12px rgba(255,255,255,0.18);
}

/* Sentinel + loader */
#infiniteSentinel{ height: 48px; width: 100%; }

.pub-loader{
  margin: 14px auto 0;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,10,30,.55);
  color: var(--muted);
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
}

/* ===============================
   Botão flutuante: Voltar ao topo
   =============================== */
.back-top{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;

  width: 46px;
  height: 46px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.35);
  background: rgba(10, 10, 30, .75);
  backdrop-filter: blur(10px);

  color: #e9ecff;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;

  transition:
    opacity .25s ease,
    transform .25s ease,
    box-shadow .25s ease,
    border-color .25s ease;
}

.back-top i{
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(233,236,255,.35));
  transition: transform .2s ease, filter .2s ease;
}

.back-top.is-show{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-top:hover{
  border-color: rgba(255,255,255,.65);
  box-shadow: 0 0 18px rgba(255,255,255,.16);
}
.back-top:hover i{
  transform: translateY(-2px) scale(1.05);
  filter: drop-shadow(0 0 14px rgba(233,236,255,.6));
}

/* =========================================================
   RESPONSIVO ESSENCIAL
   ========================================================= */
@media (max-width: 768px){
  .header{ height: 82px; padding: 14px 16px; }
  .logo-fa{ font-size: 1.8rem; }
  .site-subtitle{ font-size: 1.05rem; letter-spacing: 1px; max-width: 60vw; }

  main{ padding-top: 120px; padding-bottom: 40px; }

  .titulo-diagrama{
    top: 0;
    margin: 6px auto 18px;
    text-align: center;
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  }

  .diagram{
    width: min(96vw, 560px);
    height: min(78vw, 460px);
    margin: 0 auto 22px;
    transform: none;
    top: 0;
  }

  .circle{
    width: 70%;
    height: 100%;
    top: 0%;
    font-size: clamp(1.15rem, 5vw, 1.6rem);
    letter-spacing: 0.14em;
  }

  .circle.sapho{
    left: 0%;
    justify-content: flex-start;
    padding-left: 70px;
  }

  .circle.cern{
    left: 45%;
    justify-content: flex-start;
    padding-left: 130px;
  }

  .intersection.sc{
    left: 58%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
  }

  .link-intersection{
    font-size: clamp(0.9rem, 3.8vw, 1.05rem);
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.18);
  }

  .filter-line{
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .filters-label{
    width: auto;
    flex: none;
    text-align: center;
  }

  .filter-row,
  .search-row{
    justify-content: center;
  }

  #pubSearch{
    width: min(560px, 92vw);
  }

  .year-dd{ width: min(260px, 92vw); }

  .back-top{ right: 14px; bottom: 14px; }
}
/* Destaque da busca (grifado) */
.hl{
  font-weight: 800;
  padding: 0 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 12px rgba(255,255,255,0.10);
}
.pub-card[data-eixo="sapho"] .hl{
  background: rgba(255,138,0,0.22);
  border: 1px solid rgba(255,138,0,0.6);
  box-shadow: 0 0 14px rgba(255,138,0,0.6);
}

.pub-card[data-eixo="cern"] .hl{
  background: rgba(0,229,255,0.22);
  border: 1px solid rgba(0,229,255,0.6);
  box-shadow: 0 0 14px rgba(0,229,255,0.6);
}

.pub-card[data-eixo="sc"] .hl{
  background: rgba(179,136,255,0.22);
  border: 1px solid rgba(179,136,255,0.6);
  box-shadow: 0 0 14px rgba(179,136,255,0.6);
}


