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

:root {
  /* Premium Dark Theme (Default) */
  --primary: #7c3aed; /* Violet 600 */
  --primary-glow: rgba(124, 58, 237, 0.4);
  --accent: #3b82f6; /* Blue 500 */
  --bg: #09090b; /* Zinc 950 */
  --card-bg: rgba(24, 24, 27, 0.4); /* Zinc 900 with transparency */
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --border: rgba(39, 39, 42, 0.5);
  --shadow: rgba(0, 0, 0, 0.8);
  --glass-blur: blur(12px);
}

:root[data-theme="light"] {
  /* Light Theme */
  --primary: #6d28d9;
  --primary-glow: rgba(109, 40, 217, 0.2);
  --accent: #2563eb;
  --bg: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(0, 0, 0, 0.05);
  --text: #0f172a;
  --text-muted: #64748b;
  --border: rgba(226, 232, 240, 0.8);
  --shadow: rgba(0, 0, 0, 0.05);
  --glass-blur: blur(8px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s;
}

/* BACKGROUND GLOWS */
.bg-glows {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-1, .glow-2, .glow-3 {
  position: absolute;
  filter: blur(120px);
  opacity: 0.15;
  border-radius: 50%;
  animation: float 20s infinite alternate;
}

.glow-1 {
  width: 50vw;
  height: 50vw;
  background: var(--primary);
  top: -10%;
  right: -10%;
  animation-duration: 25s;
}

.glow-2 {
  width: 40vw;
  height: 40vw;
  background: var(--accent);
  bottom: -5%;
  left: -5%;
  animation-delay: -5s;
  animation-duration: 30s;
}

.glow-3 {
  width: 30vw;
  height: 30vw;
  background: var(--primary);
  top: 40%;
  left: 20%;
  opacity: 0.1;
  animation-duration: 20s;
}

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 50px); }
}

/* INTERACTIVE CURSOR GLOW */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle 400px at var(--cursor-x, -100%) var(--cursor-y, -100%), rgba(124, 58, 237, 0.05), transparent 80%);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s;
}

[data-theme="light"] body::after {
  display: none;
}

/* SCROLL INDICATOR */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 1001;
}

.scroll-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s;
}

/* THEME TOGGLE */
.theme-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s;
  box-shadow: 0 4px 12px var(--shadow);
}

.theme-toggle:hover {
  transform: scale(1.1);
  color: var(--primary);
}

/* LANGUAGE TOGGLE */
.lang-toggle {
  position: fixed;
  top: 74px; /* Abaixo do theme-toggle */
  left: 20px;
  z-index: 1000;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s;
  box-shadow: 0 4px 12px var(--shadow);
}

.lang-toggle:hover {
  transform: scale(1.1);
  color: var(--primary);
}

/* BACK TO TOP BUTTON */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 998;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-5px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* HEADER GLOBAL */
header {
  padding: 80px 0 40px;
  text-align: center;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  margin: 0 auto 24px;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: var(--primary);
  font-weight: bold;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 3.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.2));
}

.subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 40px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* TAGS MARQUEE ANIMATION */
.tech-tags-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 20px 0;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.tags-track {
  display: flex;
  width: max-content;
  gap: 15px;
  animation: scroll 40s linear infinite;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tag {
  display: inline-block;
  background: rgba(124, 58, 237, 0.05);
  color: var(--text);
  padding: 8px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--card-border);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  transition: all 0.3s ease;
}

.tag:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--primary);
  transform: translateY(-3px);
  color: white;
}

/* SECTIONS */
section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 50px;
  color: var(--text);
}

/* PROJECTS & BLOG GRID */
.projects-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.project-card,
.blog-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--card-border);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 10px 30px -10px var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top left, var(--primary-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card h3,
.blog-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text);
}

.project-card p,
.blog-card p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

/* BLOG SPECIFIC */
.blog-date {
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
  font-weight: 600;
}

.dashboard-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.dashboard-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.8;
  font-size: 1rem;
}

.dashboard-box .btn {
  padding: 14px 28px;
  font-size: 1rem;
}

.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tech span {
  background: rgba(108, 99, 255, 0.1);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 10px 18px; /* Reduzi o padding */
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 0.85rem; /* Reduzi o tamanho da fonte */
  box-shadow: 0 4px 15px -5px var(--primary-glow);
  position: relative;
  overflow: hidden;
  gap: 8px;
}

/* CONTAINER PARA BOTÕES EM PROJETOS */
.project-links {
  display: flex;
  gap: 12px;
  margin-top: auto; /* Empurra para o fundo do card */
  flex-wrap: wrap;
}

.project-links .btn {
  flex: 1; /* Faz os botões dividirem o espaço */
  min-width: 120px;
}

.btn:hover {
  background: #8b5cf6;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px var(--primary-glow);
}

.btn:active {
  transform: scale(0.98);
}

/* CONTATO LINKS (Index) */
.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--primary);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  h1 {
    font-size: 2.4rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

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

  .projects-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

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

/* BOTÃO HAMBURGUER */
.hamburger {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 28px;
  color: var(--text);
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.3s;
  background: var(--card-bg);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px var(--shadow);
}

.hamburger i {
  color: var(--text);
  font-size: 20px;
}

.hamburger:hover {
  transform: scale(1.1);
}

/* MENU LATERAL COM GLASSMORPHISM */
.menu-side {
  position: fixed;
  top: 0;
  right: -280px;
  width: 260px;
  height: 100vh;

  /* Glass effect */
  backdrop-filter: blur(15px);
  background: var(--card-bg);

  border-left: 1px solid var(--border);
  box-shadow: 0 8px 32px var(--shadow);

  transition: right 0.4s ease;
  padding: 60px 20px;
  z-index: 999;
}

.menu-side.open {
  right: 0;
}

.menu-side ul {
  list-style: none;
  margin-top: 20px;
}

.menu-side li {
  margin: 20px 0;
}

.menu-side a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: transform 0.2s, color 0.3s;
  display: block;
  padding: 8px 0;
  border-radius: 8px;
}

.menu-side a:hover,
.menu-side a.active {
  color: var(--primary);
  transform: translateX(5px);
  background: rgba(108, 99, 255, 0.15);
}

/* TIMELINE */
#timeline {
  padding: 60px 0;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: auto;
  padding-left: 20px;
  border-left: 2px solid var(--primary);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -9px;
  top: 5px;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--primary);
}

.timeline-content {
  background: var(--card-bg);
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px var(--shadow);
}

.timeline-content h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 6px;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* SOBRE.HTML STYLES */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 50px;
}

.role {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.content {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px var(--shadow);
}

.content h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--text);
}

.content p {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 1.05rem;
}

.highlight {
  color: var(--primary);
  font-weight: 600;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
  justify-content: center;
}

.tech-tag {
  background: rgba(108, 99, 255, 0.15);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 500;
}

.links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  background: var(--primary);
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.link-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* CONTATO.HTML STYLES */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.info-section h2,
.form-section h2 {
  font-size: 1.6rem;
  margin-bottom: 24px;
  color: var(--text);
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(108, 99, 255, 0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
}

.contact-text h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--text);
}

.contact-text a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-text a:hover {
  color: var(--primary);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

/* Responsivo Timeline */
@media (max-width: 768px) {
  .timeline {
    border-left: none;
    padding-left: 0;
  }

  .timeline-dot {
    display: none;
  }
}

/* --- PÁGINA DE ARTIGO --- */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.article-header {
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 40px;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.article-title {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.article-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-color);
}

.article-content h2 {
  font-size: 1.8rem;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--primary);
}

.article-content h3 {
  font-size: 1.4rem;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--text-color);
}

.article-content p {
  margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

.article-content li {
  margin-bottom: 10px;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 20px;
  margin: 30px 0;
  font-style: italic;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 0 8px 8px 0;
}

.article-content pre {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 30px 0;
  border: 1px solid var(--border);
}

.article-content code {
  font-family: 'Consolas', 'Monaco', monospace;
  color: #e0e0e0;
}

.article-content p code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.95em;
  color: var(--primary);
}

.article-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 30px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.share-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.share-section h3 {
  margin-bottom: 20px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.share-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}