/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: only light;
  --bg:       #0d0d14;
  --surface:  #13131d;
  --surface2: #1c1c2a;
  --accent:   #7c6af5;
  --accent2:  #4fd1c5;
  --text:     #eeeaf8;
  --muted:    #8884aa;
  --border:   rgba(124, 106, 245, 0.15);
}

html {
  forced-color-adjust: none;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; }

strong { color: var(--text); }

/* ── NAVBAR ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 3rem;
  background: rgba(13, 13, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  transition: padding 0.3s;
}

#navbar.scrolled {
  padding: 0.8rem 3rem;
}

.logo {
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: var(--text);
  letter-spacing: 0.05em;
}

.logo-accent { color: var(--accent2); }

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--text);
  letter-spacing: 0.08em;
  transition: border-color 0.2s, background 0.2s;
}

.btn-cv:hover {
  border-color: var(--accent);
  background: rgba(124, 106, 245, 0.08);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 3rem 4rem;
  gap: 20rem;
  position: relative;
  overflow: hidden;
}

/* Glow radial — sem grid */
.hero::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 106, 245, 0.09) 0%, transparent 68%);
  top: -150px;
  left: -200px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 209, 197, 0.01) 0%, transparent 68%);
  bottom: -100px;
  right: -100px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 500px;
}

/* Tag "Disponível" */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--accent2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}

.tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* Nome grande */
.hero-name {
  display: flex;
  flex-direction: column;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.name-line {
  display: block;
}

.word-gradient {
  background: linear-gradient(110deg, #b8b0ff 0%, #4fd1c5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (prefers-color-scheme: dark) {
  .word-gradient {
    background: linear-gradient(110deg, #c4beff 0%, #5ef0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

.word-plain {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

.word-highlight { color: inherit; }
.word-normal    { color: inherit; }

.hero-role {
  font-family: 'Fira Code', monospace;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: var(--muted);
  margin-bottom: 1.4rem;
  letter-spacing: 0.04em;
}

.hero-desc {
  font-size: 1rem;
  color: #b8b4d8;
  max-width: 460px;
  line-height: 1.75;
  margin-bottom: 2.2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-primary:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 2rem;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, background 0.2s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(124, 106, 245, 0.07);
}

/* Foto */
.hero-photo-wrap {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.photo-frame {
  position: relative;
  width: 320px;
  height: 390px;
}

/* Borda animada estilo neon */
.photo-frame::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent));
  background-size: 300% 300%;
  animation: borderMove 4s ease infinite;
  z-index: -1;
}

@keyframes borderMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  position: relative;
  z-index: 1;
}

/* placeholder quando não tem foto */
.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  background: var(--surface2);
  border-radius: 8px;
  z-index: 0;
}

.photo-frame:not(.no-photo) .photo-placeholder {
  display: none;
}

.photo-frame.no-photo .photo {
  display: none !important;
}

/* ── SECTIONS ── */
.section {
  padding: 6rem 3rem;
  position: relative;
  z-index: 1;
}

.section-dark {
  background: var(--surface);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.text-center { text-align: center; }

.section-tag {
  display: block;
  font-family: 'Fira Code', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  line-height: 1.1;
}

/* ── SOBRE ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: #b8b4d8;
  font-size: 0.97rem;
  line-height: 1.8;
  margin-bottom: 1.1rem;
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
}

.mini-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.mini-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.mini-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── PROJETO ── */
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.project-header {
  padding: 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(124, 106, 245, 0.12);
  border: 1px solid rgba(124, 106, 245, 0.25);
  border-radius: 20px;
  font-family: 'Fira Code', monospace;
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
}

.project-name {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.project-client {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--accent2);
  letter-spacing: 0.08em;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}

.btn-icon:hover {
  color: var(--text);
  border-color: var(--accent);
}

.project-body {
  padding: 2rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.project-desc {
  color: #b8b4d8;
  font-size: 0.94rem;
  line-height: 1.75;
  margin-bottom: 1.4rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.tech {
  padding: 0.35rem 0.9rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  position: relative;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #b8b4d8;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 7px;
  flex-shrink: 0;
}

.feature-list {
  list-style: none;
}

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  align-items: center;
  text-align: center;
}

.skill-group-title {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.skill-title-purple { color: #a89ef5; border-color: rgba(168,158,245,0.2); }
.skill-title-teal   { color: #4fd1c5; border-color: rgba(79,209,197,0.2); }
.skill-title-amber  { color: #f6ad55; border-color: rgba(246,173,85,0.2); }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.stag-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  width: 88px;
  height: 88px;
  cursor: pointer;
  user-select: none;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.stag-icon i {
  font-size: 2rem;
  line-height: 1;
}

.stag-icon span {
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.stag-icon:hover {
  transform: translateY(-2px);
}

/* Cores por categoria */
.stag-icon.stag-purple {
  background: rgba(168, 158, 245, 0.12);
  border-color: rgba(168, 158, 245, 0.3);
  color: #c4bef8;
}

.stag-icon.stag-purple.active {
  background: rgba(168, 158, 245, 0.25);
  border-color: rgba(168, 158, 245, 0.75);
  transform: scale(1.08);
}

.stag-icon.stag-teal {
  background: rgba(79, 209, 197, 0.1);
  border-color: rgba(79, 209, 197, 0.28);
  color: #81e6d9;
}

.stag-icon.stag-teal.active {
  background: rgba(79, 209, 197, 0.22);
  border-color: rgba(79, 209, 197, 0.75);
  transform: scale(1.08);
}

.stag-icon.stag-amber {
  background: rgba(246, 173, 85, 0.1);
  border-color: rgba(246, 173, 85, 0.28);
  color: #fbd38d;
}

.stag-icon.stag-amber.active {
  background: rgba(246, 173, 85, 0.22);
  border-color: rgba(246, 173, 85, 0.75);
  transform: scale(1.08);
}

/* Tooltip */
.skill-tooltip {
  position: fixed;
  background: #16162a;
  border: 1px solid rgba(124, 106, 245, 0.4);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.78rem;
  color: var(--text);
  max-width: 210px;
  line-height: 1.55;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s, transform 0.18s;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.skill-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.skill-tooltip strong {
  display: block;
  color: #a89ef5;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
  font-family: 'Fira Code', monospace;
}

/* ── SKILL CARD EXPANDIDO ── */
.skill-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.1rem 1.4rem;
  border-radius: 14px;
  border: 1px solid rgba(124, 106, 245, 0.3);
  background: #13131f;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.skill-card.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.skill-card-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-card-icon i {
  font-size: 2.6rem;
}

.skill-card-body {
  flex: 1;
}

.skill-card-body strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.skill-card-body p {
  font-size: 0.8rem;
  color: #b8b4d8;
  line-height: 1.55;
  margin: 0;
}

/* Cores por categoria */
.skill-card.card-purple {
  border-color: rgba(168, 158, 245, 0.4);
}
.skill-card.card-purple .skill-card-icon {
  background: rgba(168, 158, 245, 0.15);
  color: #c4bef8;
}
.skill-card.card-purple strong { color: #c4bef8; }

.skill-card.card-teal {
  border-color: rgba(79, 209, 197, 0.4);
}
.skill-card.card-teal .skill-card-icon {
  background: rgba(79, 209, 197, 0.12);
  color: #81e6d9;
}
.skill-card.card-teal strong { color: #81e6d9; }

.skill-card.card-amber {
  border-color: rgba(246, 173, 85, 0.4);
}
.skill-card.card-amber .skill-card-icon {
  background: rgba(246, 173, 85, 0.12);
  color: #fbd38d;
}
.skill-card.card-amber strong { color: #fbd38d; }

/* ── CONTATO ── */
.contact-desc {
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--text);
  letter-spacing: 0.06em;
  transition: border-color 0.2s, background 0.2s;
}

.contact-btn:hover {
  border-color: var(--accent);
  background: rgba(124, 106, 245, 0.07);
}

/* ── FOOTER ── */
footer {
  padding: 1.5rem 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

footer p {
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ── FADE-UP ANIMATION ── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ── RESPONSIVE ── */

/* Tablet: 768px – 900px */
@media (max-width: 900px) {
  /* Hero empilha vertical: foto em cima, texto embaixo */
  .hero {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    padding: 7rem 2rem 4rem;
    gap: 2.5rem;
  }

  .hero-content    { max-width: 100%; }
  .hero-cta        { justify-content: center; }
  .hero-tag        { justify-content: center; }
  .hero-name       { align-items: center; }
  .hero-desc       { margin: 0 auto 2.2rem; }

  .photo-frame {
    width: 220px;
    height: 265px;
  }

  /* Sobre: 1 coluna */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Projeto header: empilha */
  .project-header {
    flex-direction: column;
    gap: 1rem;
  }

  /* Skills: 2 colunas */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile grande: 480px – 768px */
@media (max-width: 768px) {
  /* Navbar: esconde links, mantém logo + CV */
  #navbar {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  /* Seções */
  .section {
    padding: 4.5rem 1.5rem;
  }

  .section-title {
    margin-bottom: 2rem;
  }

  /* Projeto: 1 coluna */
  .project-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-header {
    padding: 1.5rem;
  }

  .project-body {
    padding: 1.5rem;
  }

  /* Skills: 1 coluna */
  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* Cards sobre: 2 colunas menores */
  .about-cards {
    grid-template-columns: 1fr 1fr;
  }

  /* Contato: empilha botões */
  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .contact-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  /* Footer: centraliza */
  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.2rem 1.5rem;
  }
}

/* Mobile pequeno: até 480px */
@media (max-width: 480px) {
  #navbar {
    padding: 0.9rem 1.2rem;
  }

  .logo {
    font-size: 0.8rem;
  }

  .btn-cv {
    font-size: 0.65rem;
    padding: 0.45rem 0.8rem;
  }

  .hero {
    padding: 5.5rem 1.2rem 3rem;
    gap: 2rem;
  }

  .photo-frame {
    width: 180px;
    height: 215px;
  }

  .hero-name {
    font-size: clamp(2.4rem, 11vw, 3.2rem);
  }

  .hero-role {
    font-size: 0.72rem;
  }

  .hero-desc {
    font-size: 0.92rem;
  }

  .btn-primary,
  .btn-ghost {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .section {
    padding: 3.5rem 1.2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  /* Cards sobre: 1 coluna em telas muito pequenas */
  .about-cards {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .mini-card {
    padding: 1rem;
  }

  .mini-number {
    font-size: 1.4rem;
  }

  .project-name {
    font-size: 1.4rem;
  }

  .project-badge {
    font-size: 0.6rem;
  }

  /* Skill bar menor */
  .bar-wrap {
    width: 80px;
  }

  .skill-item {
    font-size: 0.82rem;
  }
}

/* ── NEURAL CANVAS ── */
#neural-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* ── CARD GLOW WRAP ── */
.card-glow-wrap {
  position: relative;
  border-radius: 13px;
  padding: 2px;
  background: linear-gradient(
    var(--angle, 0deg),
    #7c6af5,
    #4fd1c5,
    #7c6af5,
    #4fd1c5
  );
  animation: borderSpin 4s linear infinite;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes borderSpin {
  to { --angle: 360deg; }
}

.card-glow-wrap .project-card {
  border: none;
  border-radius: 11px;
  position: relative;
  z-index: 1;
}

/* Glow externo pulsante */
.card-glow-wrap::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  background: inherit;
  filter: blur(12px);
  opacity: 0.35;
  animation: borderSpin 4s linear infinite, glowPulse 2s ease-in-out infinite;
  z-index: 0;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.5;  }
}
