/* ============================================================
   TEMA: "SALA DE OPERAÇÕES CLOUD"
   Paleta escura de console de monitoramento, com spine central
   simulando um traço de rede transportando dados — coerente com
   um perfil de Cloud Architect / Segurança / Identidade.
   ============================================================ */

:root{
  --bg: #0A0E1A;
  --bg-panel: #10162A;
  --bg-elevated: #172038;
  --line: #232E4A;
  --azure: #4C9EFF;
  --azure-dim: #2E5C99;
  --cyan: #2DD4C4;
  --amber: #F5A623;
  --text: #E7ECF5;
  --text-muted: #9099B0;
  --text-dim: #5B6580;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 10px;
  --container: 1080px;
}

*, *::before, *::after{ box-sizing: border-box; }

/* Garantia global: o atributo hidden sempre esconde o elemento,
   independente de qualquer outra regra de display definida depois
   (evita bugs de filtro/toggle causados por especificidade de CSS) */
[hidden]{ display: none !important; }

html{ scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a{ color: var(--azure); }

::selection{ background: var(--azure-dim); color: #fff; }

:focus-visible{
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* Grade de fundo, sutil, tipo diagrama de topologia */
.grid-bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
}

.wrap{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============================= HEADER / STATUS BAR ============================= */

.statusbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.statusbar .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.statusbar .brand{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.statusbar .dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(45,212,196,0.6);
  animation: pulse-dot 2.4s ease-out infinite;
}

@keyframes pulse-dot{
  0%   { box-shadow: 0 0 0 0 rgba(45,212,196,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(45,212,196,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,212,196,0); }
}

.statusbar .uptime{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* ============================= HERO ============================= */

.hero{
  padding: 72px 0 64px;
  position: relative;
}

.hero-flex{
  display: flex;
  align-items: flex-start;
  gap: 44px;
}

.hero-content{
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

@media (max-width: 860px){
  .hero-flex{ flex-direction: column; align-items: center; text-align: center; }
  .hero-content{ text-align: left; width: 100%; }
}

.hero .eyebrow{
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero .eyebrow::before{
  content: "";
  width: 28px;
  height: 1px;
  background: var(--cyan);
  display: inline-block;
}

.hero h1{
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 18px;
  max-width: 16ch;
  font-weight: 600;
}

.hero h1 .accent{ color: var(--azure); }

.hero .role{
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 62ch;
}

.hero .summary{
  color: var(--text-muted);
  max-width: 62ch;
  font-size: 1.02rem;
  margin: 0 0 36px;
}

.hero .cta-row{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.btn{
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
  cursor: pointer;
}

.btn:hover{ border-color: var(--azure); transform: translateY(-1px); }

.btn.primary{
  background: var(--azure);
  border-color: var(--azure);
  color: #06101f;
  font-weight: 600;
}

.btn.primary:hover{ background: #5fa9ff; }

/* ============================= STATS ============================= */

.stats{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 80px;
}

.stat{
  background: var(--bg-panel);
  padding: 22px 20px;
}

.stat .n{
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--azure);
  display: block;
}

.stat .l{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ============================= SECTION HEADS ============================= */

.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-head h2{
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0;
  font-weight: 600;
}

.section-head .tag{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* ============================= FILTERS ============================= */

.filters{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.chip{
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s ease;
}

.chip:hover{ border-color: var(--azure); color: var(--text); }

.chip.active{
  background: var(--azure);
  border-color: var(--azure);
  color: #06101f;
  font-weight: 600;
}

/* ============================= JOURNEY NOTE ============================= */

.journey-note{
  color: var(--text-dim);
  font-size: 13.5px;
  max-width: 56ch;
  margin: -22px 0 40px;
}

/* ============================= TIMELINE / JOURNEY TRAIL ============================= */

.timeline{
  position: relative;
  padding: 20px 0 90px;
}

.journey-path{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: visible;
}

#journeyPathFg{
  stroke-dasharray: var(--path-len, 3000);
  stroke-dashoffset: var(--path-len, 3000);
  transition: stroke-dashoffset .15s linear;
}

.nodes-layer{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.journey-node{
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--azure);
  transform: translate(-50%, -50%);
  transition: border-color .3s ease, box-shadow .3s ease;
}

.journey-node svg{ width: 15px; height: 15px; }

.journey-node.milestone{
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 0 5px rgba(245,166,35,0.12);
}

.journey-node.active{
  box-shadow: 0 0 0 6px rgba(76,158,255,0.18);
  border-color: var(--azure);
}

.tl-item{
  position: relative;
  z-index: 2;
  width: 44%;
  padding: 0 0 64px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.tl-item.in-view{ opacity: 1; transform: translateY(0); }

.tl-item:nth-child(odd){ margin-left: 0; text-align: right; }
.tl-item:nth-child(even){ margin-left: 56%; text-align: left; }

@media (max-width: 780px){
  .tl-item, .tl-item:nth-child(odd), .tl-item:nth-child(even){
    width: 100%;
    margin-left: 0;
    padding-left: 54px;
    text-align: left;
  }
}

.tl-item[hidden]{ display: none; }

.tl-card{
  position: relative;
  background: rgba(23,32,56,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: inline-block;
  width: 100%;
  text-align: left;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}

.tl-item:hover .tl-card{
  border-color: var(--azure-dim);
  transform: translateY(-3px);
  background: rgba(23,32,56,0.85);
}

.tl-item.milestone .tl-card{ border-color: rgba(245,166,35,0.35); }

.tl-date{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  display: block;
  margin-bottom: 10px;
}

.tl-item.milestone .tl-date{ color: var(--amber); }

.tl-card h3{
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 4px;
  font-weight: 600;
}

.tl-org{
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.tl-desc{
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.tl-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--amber);
  border: 1px solid rgba(245,166,35,0.4);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.tl-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  color: var(--azure);
}

.tl-link:hover{ color: var(--cyan); }

/* ============================= CERTIFICATIONS ============================= */

.cert-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 90px;
}

.cert{
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color .2s ease, transform .2s ease;
}

.cert:hover{ border-color: var(--azure-dim); transform: translateY(-2px); }

.cert .badge-icon{
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #06101f;
  background: var(--azure);
}

.cert[data-level="expert"] .badge-icon{ background: var(--amber); }
.cert[data-level="trainer"] .badge-icon{ background: var(--cyan); }
.cert[data-level="fundamentals"] .badge-icon{ background: var(--azure-dim); color: var(--text); }

.cert .code{
  font-family: var(--font-mono);
  font-size: 13px;
  display: block;
  color: var(--text);
  margin-bottom: 2px;
}

.cert .title{
  font-size: 12.5px;
  color: var(--text-muted);
  display: block;
}

/* ============================= FOOTER ============================= */

footer{
  border-top: 1px solid var(--line);
  padding: 40px 0 60px;
  text-align: center;
}

footer p{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin: 6px 0;
}

footer a{ color: var(--text-muted); }

/* ============================= ALTITUDE GAUGE ============================= */

.altitude-gauge{
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 40;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s ease, transform .4s ease;
}

.altitude-gauge.visible{ opacity: 1; transform: translateY(0); }

.ag-track{
  position: relative;
  width: 6px;
  height: 130px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  overflow: visible;
}

.ag-fill{
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber), var(--azure), var(--cyan));
}

.ag-marker{
  position: absolute;
  left: 50%;
  bottom: 0%;
  transform: translate(-50%, 50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--azure);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--cyan);
  transition: bottom .1s linear;
}

@media (max-width: 640px){
  .altitude-gauge{ display: none; }
}

/* ============================= PORTFOLIO ============================= */

.section-eyebrow{
  margin-bottom: 8px;
}

.portfolio-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-bottom: 90px;
}

.pf-card{
  background: rgba(23,32,56,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.pf-card[hidden]{ display: none; }

.pf-card:hover{ border-color: var(--azure-dim); transform: translateY(-3px); }

.pf-thumb{
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
}

.pf-thumb-wrap{
  position: relative;
  width: 100%;
  height: 140px;
}

.pf-thumb-wrap .pf-thumb-placeholder{
  position: absolute;
  inset: 0;
}

.pf-thumb-placeholder{
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-panel));
  border-bottom: 1px solid var(--line);
  color: var(--azure-dim);
}

.pf-thumb-placeholder svg{ width: 34px; height: 34px; }

.pf-body{ padding: 20px 22px 22px; }

.pf-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.pf-date{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  display: block;
  margin-bottom: 10px;
}

.pf-card h3{
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 4px;
  font-weight: 600;
}

.pf-org{
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

.pf-desc{
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.pf-card-expand{
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--azure);
}

.pf-card .tl-link{ margin-top: 12px; }

.pf-type{
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--azure);
  border: 1px solid rgba(76,158,255,0.35);
}

.pf-type.artigo{ color: var(--cyan); border-color: rgba(45,212,196,0.35); }
.pf-type.evento{ color: var(--text-muted); border-color: var(--line); }
.pf-type.mentoria{ color: var(--amber); border-color: rgba(245,166,35,0.4); }
.pf-type.midia{ color: var(--azure-dim); border-color: var(--azure-dim); }

#pfExpandBtn{
  margin: 8px auto 0;
  display: flex;
}

/* ============================= HERO PHOTO ============================= */

.hero-photo{
  position: relative;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 0.82;
  flex-shrink: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(76,158,255,0.35);
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-panel));
  box-shadow: 0 0 0 6px rgba(76,158,255,0.08), 0 24px 48px -16px rgba(0,0,0,0.55);
}

@media (max-width: 860px){
  .hero-photo{ width: 100%; max-width: 320px; }
}

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

/* ============================= PORTFOLIO MODAL ============================= */

.pf-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6,10,20,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.pf-modal-overlay.open{
  opacity: 1;
  pointer-events: auto;
}

.pf-modal{
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform .25s ease;
}

.pf-modal-overlay.open .pf-modal{ transform: translateY(0); }

.pf-modal-media{
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  background: var(--bg-elevated);
}

.pf-modal-media-wrap{
  position: relative;
  width: 100%;
  height: 260px;
}

.pf-modal-media-wrap .pf-modal-media-placeholder{
  position: absolute;
  inset: 0;
  height: 100%;
}

.pf-modal-media-placeholder{
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-panel));
  color: var(--azure-dim);
}

.pf-modal-media-placeholder svg{ width: 56px; height: 56px; }

.pf-modal-body{ padding: 26px 28px 30px; position: relative; }

.pf-modal-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(10,14,26,0.6);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  z-index: 2;
}

.pf-modal-close:hover{ border-color: var(--azure); color: var(--azure); }

.pf-modal-top{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pf-modal-body h3{
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 6px;
  font-weight: 600;
}

.pf-modal-org{
  font-size: 14px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.pf-modal-date{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--cyan);
  display: block;
  margin-bottom: 18px;
}

.pf-modal-desc{
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 18px;
}

.pf-modal-body .tl-link{
  display: flex;
  margin-top: 0;
  margin-bottom: 10px;
}

body.pf-modal-active{ overflow: hidden; }
