:root{
  --teal:#00AE9D;
  --purple:#6f42c1;
  --bg-dark: radial-gradient(1200px 600px at 10% -10%, rgba(0, 174, 157, .15), transparent 60%),
             radial-gradient(900px 500px at 110% 10%, rgba(0, 0, 0, 0.18), transparent 60%),
             linear-gradient(180deg, #051014, #0b1f24 30%, #0c1116);
  --bg-light: radial-gradient(1200px 600px at 85% -10%, rgba(0, 229, 255, 0.30), transparent 60%),
              radial-gradient(900px 500px at 5% 15%, rgba(0, 0, 0, 0.3), transparent 60%),
              linear-gradient(180deg, #F5F7FB, #EEF2F7 30%, #FFFFFF);
  --tech-fg:#ffffff;
}

html,body{height:100%}
body{
  margin:0;
  background:var(--bg-dark);
  color:#fff;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x:hidden;
  transition:background .7s cubic-bezier(.77,.2,.25,1), color .5s cubic-bezier(.77,.2,.25,1);
}
.glass{backdrop-filter: blur(8px);} 
.chip{border:1px solid rgba(255,255,255,.18); background:#000; color:#fff;} 
.chip.active{background:#fff;color:#000;border-color:#fff;}
.link-ghost{border:1px solid rgba(255,255,255,.14);} 

#bg-stars{position:fixed; inset:0; z-index:-4; pointer-events:none; display:block;}
#bg-scrim{position:fixed; inset:0; z-index:-3; pointer-events:none; transition:background .4s ease;}
#techLayer{position:fixed; inset:0; z-index:-1; pointer-events:none;}

#techLayer .tech{
  position:absolute; display:flex; align-items:center; gap:.4rem;
  transform:translate3d(-9999px,-9999px,0); color:var(--tech-fg);
  opacity:.22; will-change:transform,opacity;
  transition: opacity .45s ease;
}
#techLayer .tech.hidden{ opacity:0; }
#techLayer .tech i{ font-size:16px; line-height:1; }
#techLayer .label{ font-size:11px; opacity:.56; }

header, section, footer{position:relative; z-index:1;}

/* Temas na UI */
#siteRoot.theme-dark{color:#fff;}
#siteRoot.theme-light{color:#000;}
#siteRoot i.fa-solid,
#siteRoot i.fa-regular,
#siteRoot i.fa-brands,
#siteRoot i.fa{color:currentColor!important;}

/* Superfícies (cards) */
.surface-card{ border-width:1px; border-style:solid; }
#siteRoot.theme-dark .surface-card{ background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.10); color:inherit; }
#siteRoot.theme-dark .surface-card:hover{ background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }
#siteRoot.theme-light .surface-card{ background: rgba(0,0,0,0.92); border-color: rgba(0,0,0,0.90); color:#fff; }
#siteRoot.theme-light .surface-card:hover{ background: rgba(0,0,0,0.96); }

#btnTheme{ position:fixed; right:1.25rem; bottom:1.25rem; z-index:10; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.08); padding:.75rem; border-radius:9999px; transition: all 0.3s ease; }
#btnTheme:hover{background:rgba(255,255,255,.16);} 
#btnTheme[disabled]{opacity:.6; cursor:progress;}

/* Animação de brilho no botão */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.2); transform: scale(1); }
  50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 60px rgba(255, 255, 255, 0.4); transform: scale(1.05); }
}

#btnTheme.highlight {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Tooltip do botão */
#themeTooltip {
  position: fixed;
  right: 5rem;
  bottom: 1.5rem;
  z-index: 9;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, color 0.3s ease;
  pointer-events: none;
  font-weight: 500;
  line-height: 1.5;
}
#themeTooltip.show {
  pointer-events: auto;
}

/* Tooltip no tema escuro */
#siteRoot.theme-dark #themeTooltip {
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Tooltip no tema claro */
#siteRoot.theme-light #themeTooltip {
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#themeTooltip.show {
  opacity: 1;
  transform: translateX(0);
}

/* Tags de skill na seção Sobre */
.skill-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.72rem;
  white-space: nowrap;
  border: 1px solid currentColor;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.skill-tag:hover { opacity: 1; }
#siteRoot.theme-dark  .skill-tag { border-color: rgba(255,255,255,0.20); background: rgba(255,255,255,0.05); color: #fff; }
#siteRoot.theme-light .skill-tag { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.08); color: #fff; }

/* ===== Abas da seção Sobre ===== */
.sobre-tab {
  padding: 0.4rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}
#siteRoot.theme-dark  .sobre-tab { color: #fff; border-color: rgba(255,255,255,0.15); }
#siteRoot.theme-dark  .sobre-tab:hover { background: rgba(255,255,255,0.08); }
#siteRoot.theme-dark  .sobre-tab.active { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); }
#siteRoot.theme-light .sobre-tab { color: #111; border-color: rgba(0,0,0,0.20); }
#siteRoot.theme-light .sobre-tab:hover { background: rgba(0,0,0,0.07); }
#siteRoot.theme-light .sobre-tab.active { background: rgba(0,0,0,0.10); border-color: rgba(0,0,0,0.40); }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 2rem; }

.timeline::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, currentColor 10%, currentColor 90%, transparent);
  opacity: 0.18;
}

.tl-item {
  position: relative;
  padding-bottom: 2rem;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -1.6rem;
  top: 1.1rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
}

.tl-pulse {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
  animation: tl-blink 2.4s ease-in-out infinite;
}

@keyframes tl-blink {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.6); }
}

.tl-item:nth-child(2) .tl-pulse { animation-delay: 0.4s; }
.tl-item:nth-child(3) .tl-pulse { animation-delay: 0.8s; }
.tl-item:nth-child(4) .tl-pulse { animation-delay: 1.2s; }
.tl-item:nth-child(5) .tl-pulse { animation-delay: 1.6s; }
.tl-item:nth-child(6) .tl-pulse { animation-delay: 2.0s; }

.tl-card { flex: 1; }

.tl-badge {
  font-size: 0.70rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 0.55;
  white-space: nowrap;
}

/* Menu mobile — sempre texto branco (fundo escuro em ambos os temas) */
#mobileNav { color: #fff !important; }
#mobileNav a { color: #fff !important; }

/* ===== Mobile ===== */
@media (max-width: 767px) {
  #btnTheme { right: 0.75rem; bottom: 0.75rem; padding: 0.6rem; }
  #themeTooltip { right: 4rem; bottom: 0.9rem; font-size: 0.8rem; }
  .timeline { padding-left: 1.5rem; }
  .tl-dot { left: -1.2rem; }
  .tl-item { gap: 0.8rem; padding-bottom: 1.5rem; }
}

/* ===== Flip card da foto (Sobre) ===== */
.flip-card {
  perspective: 1000px;
  cursor: pointer;
  width: 12rem;
  height: 12rem;
}
@media (min-width: 768px) {
  .flip-card { width: 14rem; height: 14rem; }
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.75s cubic-bezier(.77,.2,.25,1);
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 1.5rem;
  overflow: hidden;
}
.flip-card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #fff;
}
.flip-card-back .qr-hint {
  font-size: 0.7rem;
  color: #555;
  font-weight: 500;
}

/* Partículas sugadas pelo buraco negro */
.suck-particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8), 0 0 8px rgba(255, 255, 255, 0.4);
}
