/* ========== Variables & Base ========== */
:root {
  --app-bg: #0a0a0c;
  --app-text: #f1f5f9;
  --app-border: rgba(255, 255, 255, 0.1);
  --app-glass-bg: rgba(255, 255, 255, 0.03);
  --primary: #ad2bee;
  --bg-dark: #0a0a0c;
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-serif: 'Playfair Display', serif;
}

html[data-theme="light"] {
  --app-bg: #f1f5f9;
  --app-text: #0f172a;
  --app-border: rgba(0, 0, 0, 0.08);
  --app-glass-bg: rgba(255, 255, 255, 0.85);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--app-bg);
  color: var(--app-text);
  min-height: 100vh;
  overflow-x: hidden;
}
body.theme-light { background-color: #f1f5f9 !important; color: #0f172a !important; }

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

.app-content { position: relative; z-index: 10; min-height: 100vh; transition: color 0.3s; }

/* ========== Background ========== */
#app-background {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background-color: var(--app-bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% 20%, rgba(173,43,238,0.21), transparent 70%);
}
.theme-light #app-background { background-color: #f1f5f9 !important; }

/* Spotlight que segue o mouse - centralizado por padrão */
.spotlight {
  position: absolute;
  left: 50%; top: 50%;
  width: min(100vmax, 800px); height: min(100vmax, 800px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(173,43,238,0.12) 0%, rgba(99,102,241,0.06) 40%, transparent 70%);
  filter: blur(40px);
  transition: transform 0.5s ease-out;
  pointer-events: none;
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.9;
  transition: transform 0.3s ease-out;
  pointer-events: none;
}
.orb-1 { top: -10%; left: -10%; width: 1000px; height: 1000px; background: rgba(173,43,238,0.21); animation: pulse 4s ease-in-out infinite; }
.orb-2 { bottom: 10%; right: -10%; width: 800px; height: 800px; background: rgba(37,99,235,0.18); }
.orb-3 { top: 30%; left: 10%; width: 700px; height: 700px; background: rgba(219,39,119,0.14); }
@keyframes pulse { 0%,100%{ opacity: 0.9 } 50%{ opacity: 0.7 } }

.noise {
  position: absolute; inset: 0;
  background: url('https://grainy-gradients.vercel.app/noise.svg');
  opacity: 0.05; mix-blend-mode: overlay;
}

/* ========== Glass ========== */
.glass {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--app-border);
}
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  .glass { background: var(--app-glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}

/* ========== Navbar ========== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 1rem 1.5rem;
}
.navbar-glass {
  position: relative; max-width: 80rem; margin: 0 auto; border-radius: 9999px; overflow: hidden;
}
.navbar-glass-blur {
  position: absolute; inset: 0; border-radius: inherit; z-index: 0; background: transparent; pointer-events: none;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.navbar-glass-inner {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.08); border: 1px solid var(--app-border); border-radius: inherit;
  padding: 0.75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
@media (min-width: 768px) { .navbar-glass-inner { padding: 0.75rem 2rem; } }

.nav-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: inherit; }
.logo-icon { width: 24px; height: 24px; color: var(--primary); }
.site-name { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.025em; font-size: 1.125rem; }
.theme-light .app-content .site-name { color: #0f172a !important; }

.nav-desktop { display: none; align-items: center; gap: 1.5rem; }
@media (min-width: 768px) { .nav-desktop { display: flex; } }
.nav-desktop a { font-size: 0.875rem; font-weight: 500; color: #cbd5e1; text-decoration: none; transition: color 0.2s; }
.nav-desktop a:hover { color: #fff; }
.theme-toggle-btn {
  padding: 0.5rem; border-radius: 9999px; background: transparent; border: none; cursor: pointer;
  color: #cbd5e1; transition: color 0.2s, background 0.2s;
}
.theme-toggle-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.theme-light .app-content .theme-toggle-btn,
.theme-light .app-content .theme-toggle-btn * { color: #0f172a !important; }
.theme-toggle-btn .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle-btn .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle-btn .icon-moon { display: block; }

/* CTA Let's Chat: mesma cor primary do React (#ad2bee) */
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background-color: #ad2bee;
  color: #fff !important;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem; font-weight: 700; text-decoration: none;
  transition: background-color 0.2s;
  box-shadow: 0 10px 15px -3px rgba(173,43,238,0.2);
}
.btn-whatsapp:hover { background-color: rgba(173,43,238,0.8); }
/* CTA header: fonte sempre branca no modo claro */
.theme-light .app-content .btn-whatsapp { background-color: #ad2bee !important; color: #fff !important; }
.theme-light .app-content .btn-whatsapp:hover { background-color: rgba(173,43,238,0.85) !important; color: #fff !important; }
.theme-light .app-content .btn-whatsapp *,
.theme-light .app-content .btn-whatsapp svg { color: #fff !important; fill: #fff !important; }
.theme-light .app-content .navbar .btn-whatsapp { color: #fff !important; }
.theme-light .app-content .navbar .btn-whatsapp * { color: #fff !important; fill: #fff !important; }

.nav-mobile { display: flex; align-items: center; gap: 0.25rem; }
@media (min-width: 768px) { .nav-mobile { display: none; } }
.mobile-menu-btn { padding: 0.5rem; background: none; border: none; color: #cbd5e1; cursor: pointer; transition: color 0.2s; }
.mobile-menu-btn:hover { color: #fff; }
.theme-light .app-content .mobile-menu-btn,
.theme-light .app-content .mobile-menu-btn * { color: #0f172a !important; }
.mobile-menu-btn .icon-close { display: none; }
.mobile-menu-btn[aria-expanded="true"] .icon-menu { display: none; }
.mobile-menu-btn[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu { display: none; position: fixed; inset: 0; z-index: 50; }
.mobile-menu[aria-hidden="false"] { display: block; }
.mobile-menu-backdrop { position: fixed; inset: 0; z-index: 40; }
.mobile-menu-panel {
  position: fixed; left: 1rem; right: 1rem; top: calc(5rem + 16px); z-index: 50;
  padding: 1.5rem; border-radius: 24px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--app-border);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 8px 32px rgba(0,0,0,0.24);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  .mobile-menu-panel { background: var(--app-glass-bg); }
}
.mobile-menu-link { display: block; padding: 0.75rem 1rem; color: #cbd5e1; text-decoration: none; border-radius: 0.75rem; font-weight: 500; transition: color 0.2s, background 0.2s; }
.mobile-menu-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.mobile-menu-whatsapp { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1rem; padding: 0.75rem 1.5rem; background: var(--primary); color: #fff; border-radius: 0.75rem; font-size: 0.875rem; font-weight: 700; text-decoration: none; }

/* ========== Main ========== */
main { padding-top: 5rem; }

/* ========== Hero ========== */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3rem;
  padding: 2rem 1.5rem 2.5rem; max-width: 56rem; margin: 0 auto;
}
@media (min-width: 768px) { .hero { padding: 3rem 1.5rem 4rem; } }
.hero-content { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.hero-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
/* Borda em gradiente igual à versão React: 2px gradiente + 4px fundo escuro + 64px imagem */
.hero-avatar-outer {
  position: relative;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(to right, var(--primary), #6366f1, var(--primary));
  box-shadow: 0 10px 15px -3px rgba(173,43,238,0.2);
}
.hero-avatar-inner {
  width: 4.5rem;   /* 72px: 4px + 64px + 4px para a imagem ficar 64px */
  height: 4.5rem;
  padding: 4px;
  border-radius: 50%;
  background: var(--bg-dark);
  overflow: hidden;
  box-sizing: border-box;
}
.hero-avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero-avatar img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.hero-badge { background: rgba(173,43,238,0.1); color: var(--primary); padding: 0.25rem 1rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; border: 1px solid rgba(173,43,238,0.2); }
.hero-title { font-size: 2.5rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; font-family: var(--font-display); margin: 0; max-width: 56rem; }
@media (min-width: 768px) { .hero-title { font-size: 4rem; } }
.text-primary { color: var(--primary); }
.font-serif { font-family: var(--font-serif); font-style: italic; }
.gradient-text { background: linear-gradient(90deg, var(--primary), #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 1.125rem; color: #94a3b8; max-width: 42rem; margin: 0; line-height: 1.6; }
@media (min-width: 768px) { .hero-subtitle { font-size: 1.25rem; } }

.hero-ai-wrap { width: 100%; max-width: 42rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.glow-border { position: relative; min-width: 0; }
.glow-border::after { content: ''; position: absolute; inset: -2px; background: linear-gradient(45deg, #ad2bee, #6366f1, #ad2bee); z-index: -1; border-radius: 1rem; filter: blur(8px); opacity: 0.5; }
.ai-box { display: flex; align-items: center; flex-wrap: nowrap; gap: 0.25rem; padding: 0.35rem 0.5rem; border-radius: 0.75rem; min-width: 0; overflow: hidden; }
@media (min-width: 480px) { .ai-box { gap: 0.5rem; padding: 0.5rem; } }
.ai-icon { color: rgba(173,43,238,0.6); flex-shrink: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.ai-icon svg { width: 100%; height: 100%; }
@media (min-width: 480px) { .ai-icon { width: 24px; height: 24px; } }
.ai-input { flex: 1; min-width: 0; width: 0; background: transparent; border: none; outline: none; color: #fff; padding: 0.4rem 0.5rem; font-size: 0.875rem; }
@media (min-width: 480px) { .ai-input { padding: 1rem; font-size: 1rem; width: auto; } }
.ai-input::placeholder { color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-input:focus { outline: none; box-shadow: none; }
.btn-sparkle { flex-shrink: 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.35rem; background: var(--primary); color: #fff; padding: 0.5rem 0.6rem; border-radius: 0.5rem; font-weight: 700; border: none; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 10px 15px -3px rgba(173,43,238,0.25); font-size: 0.75rem; }
.btn-sparkle .sparkle-icon { width: 14px; height: 14px; flex-shrink: 0; }
@media (min-width: 480px) { .btn-sparkle { padding: 0.75rem 1.5rem; font-size: 1rem; gap: 0.5rem; } .btn-sparkle .sparkle-icon { width: 16px; height: 16px; } }
.btn-sparkle:hover:not(:disabled) { transform: scale(1.02); }
.btn-sparkle:disabled { opacity: 0.5; cursor: not-allowed; }
.sparkle-icon.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.ai-response { display: none; padding: 2rem; border-radius: 1rem; border: 1px solid rgba(173,43,238,0.2); position: relative; overflow: hidden; text-align: left; }
.ai-response[data-visible="true"] { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.ai-response-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.ai-response-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(173,43,238,0.2); display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; }
.ai-response-header h4 { margin: 0; font-weight: 700; color: var(--primary); }
.ai-response-header p { margin: 0.25rem 0 0; font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.ai-response-text { color: #cbd5e1; line-height: 1.6; margin: 0 0 2rem; font-size: 1.125rem; }
.ai-response-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.ai-response-actions .btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--primary); color: #fff; padding: 0.75rem 2rem; border-radius: 9999px; font-weight: 700; text-decoration: none; }
.btn-dismiss { padding: 0.75rem 2rem; border-radius: 9999px; font-weight: 700; color: #94a3b8; background: none; border: none; cursor: pointer; }
.btn-dismiss:hover { color: #fff; }

/* Glitch avatar */
.glitch-avatar { position: relative; }
.glitch-avatar::before, .glitch-avatar::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: inherit; background-size: cover; background-position: center; border-radius: inherit; z-index: 1; opacity: 0; transition: opacity 0.2s; }
.glitch-avatar:hover::before { opacity: 1; left: 2px; background-color: rgba(255,0,193,0.2); background-blend-mode: multiply; animation: glitch 2s infinite linear alternate-reverse; }
.glitch-avatar:hover::after { opacity: 1; left: -2px; background-color: rgba(0,255,249,0.2); background-blend-mode: multiply; animation: glitch 3s infinite linear alternate-reverse; }
@keyframes glitch {
  0% { clip-path: inset(40% 0 61% 0); transform: translate(-2px,-2px); }
  20% { clip-path: inset(92% 0 1% 0); transform: translate(2px,2px); }
  40% { clip-path: inset(43% 0 1% 0); transform: translate(-2px,2px); }
  60% { clip-path: inset(25% 0 58% 0); transform: translate(2px,-2px); }
  80% { clip-path: inset(54% 0 7% 0); transform: translate(-2px,-2px); }
  100% { clip-path: inset(58% 0 43% 0); transform: translate(2px,2px); }
}

/* ========== Works ========== */
.section-works { padding: 2.5rem 1.5rem 6rem; max-width: 80rem; margin: 0 auto; }
.works-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 3rem; flex-wrap: wrap; gap: 1rem; }
.section-title { font-size: 1.875rem; font-weight: 700; margin: 0 0 0.5rem; font-family: var(--font-display); }
.text-slate-400 { color: #94a3b8; }
.works-view-all-btn, .works-show-less-btn {
  display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem; border-radius: 9999px;
  font-weight: 600; border: 1px solid rgba(255,255,255,0.1); cursor: pointer; transition: all 0.3s;
}
.works-view-all-btn { color: var(--primary); }
.works-view-all-btn:hover { color: #fff; background: rgba(173,43,238,0.2); border-color: rgba(173,43,238,0.5); }
.theme-light .app-content #works .works-view-all-btn,
.theme-light .app-content #works .works-view-all-btn * { color: #ad2bee !important; }
.theme-light .app-content #works .works-view-all-btn:hover,
.theme-light .app-content #works .works-view-all-btn:hover * { color: #fff !important; }
.works-show-less-btn { color: #94a3b8; }
.works-show-less-btn:hover { color: #fff; border-color: rgba(255,255,255,0.25); }
.theme-light .app-content #works .works-show-less-btn,
.theme-light .app-content #works .works-show-less-btn * { color: #334155 !important; }
.theme-light .app-content #works .works-show-less-btn:hover,
.theme-light .app-content #works .works-show-less-btn:hover * { color: #0f172a !important; }
.show-less-wrap { display: flex; justify-content: center; margin-top: 3rem; }
.works-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }
.work-card {
  position: relative; overflow: hidden; border-radius: 1rem; aspect-ratio: 16/10; cursor: pointer;
  background-size: cover; background-position: center; transition: transform 0.7s;
}
.work-card:hover { transform: scale(1.05); }
.work-card::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.3); z-index: 0; }
.work-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,12,0.85), rgba(10,10,12,0.25), transparent); z-index: 0; }
.work-card-content { position: absolute; bottom: 0; left: 0; padding: 2rem; z-index: 1; }
.work-card-category { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.5rem; display: block; }
.work-card-title { font-size: 1.5rem; font-weight: 700; color: #fff; margin: 0 0 1rem; font-family: var(--font-display); }
.theme-light .app-content #works .work-card-title { color: #ad2bee !important; }
/* Modo claro: cards dos works mais claros e texto legível */
.theme-light .app-content #works .work-card::before { background: rgba(0,0,0,0.08); }
.theme-light .app-content #works .work-card::after { background: linear-gradient(to top, rgba(255,255,255,0.85), rgba(255,255,255,0.25), transparent); }
.theme-light .app-content #works .work-card-category { color: #7c3aed !important; }
.theme-light .app-content #works .work-card-title { color: #0f172a !important; }
.theme-light .app-content #works .card-case-study-btn,
.theme-light .app-content #works .card-case-study-btn * { color: #fff !important; fill: #fff !important; }
.card-case-study-btn {
  padding: 0.5rem 1.5rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 500; border: none; cursor: pointer;
  background: rgba(255,255,255,0.08); border: 1px solid var(--app-border); color: #fff;
  opacity: 0; transform: translateY(8px); transition: all 0.2s;
}
.work-card:hover .card-case-study-btn { opacity: 1; transform: translateY(0); }
.theme-light .app-content #works .card-case-study-btn { background: #ad2bee !important; border-color: rgba(173,43,238,0.5) !important; }
.work-card.hidden { display: none !important; }

/* ========== Resume ========== */
.section-resume { padding: 6rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.05); overflow: hidden; }
.resume-inner { max-width: 80rem; margin: 0 auto; }
.section-title.center { text-align: center; margin-bottom: 4rem; }
.timeline-scroll-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  padding: 2.5rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  user-select: none;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 1rem;
}
.timeline-scroll-wrap::-webkit-scrollbar { display: none; }
.timeline-scroll-wrap.dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }
.timeline-scroll-wrap:active { cursor: grabbing; }
.timeline-track { display: flex; gap: 2rem; padding: 0 1rem; flex-shrink: 0; }
.timeline-item {
  min-width: 300px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}
@media (min-width: 768px) { .timeline-item { min-width: 350px; } }
.timeline-item::before { content: ''; position: absolute; top: 1.25rem; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, rgba(173,43,238,0.3), rgba(173,43,238,0.5), rgba(173,43,238,0.3)); z-index: -1; }
.timeline-icon { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--bg-dark); border: 1px solid var(--primary); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.timeline-card { width: 100%; padding: 1.5rem; border-radius: 1rem; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.05); transition: background 0.2s; box-sizing: border-box; }
.timeline-card:hover { background: rgba(255,255,255,0.05); }
.theme-light .app-content #resume .timeline-card { background: rgba(255,255,255,0.9) !important; border-color: rgba(0,0,0,0.08) !important; }
.timeline-card time { color: var(--primary); font-weight: 700; font-size: 0.875rem; }
.timeline-card .tag { font-size: 10px; background: rgba(173,43,238,0.2); color: var(--primary); padding: 0.125rem 0.5rem; border-radius: 0.25rem; text-transform: uppercase; font-weight: 700; }
.timeline-card h4 { font-size: 1.125rem; font-weight: 700; margin: 0 0 0.25rem; font-family: var(--font-display); }
.timeline-card p { font-size: 0.875rem; color: #94a3b8; margin: 0; }
.theme-light .app-content #resume .timeline-card p,
.theme-light .app-content #resume .timeline-card time,
.theme-light .app-content #resume .timeline-card h4 { color: #0f172a !important; }
.theme-light .app-content #resume .timeline-card .tag { color: #ad2bee !important; }
.timeline-dots { display: flex; justify-content: center; gap: 0.25rem; margin-top: 2rem; }
.timeline-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.1); }
.resume-download-wrap { display: flex; justify-content: center; margin-top: 3rem; }
.resume-download-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 2rem; border-radius: 9999px; font-weight: 700; color: var(--primary); text-decoration: none; border: 1px solid rgba(255,255,255,0.1); transition: all 0.2s; }
.resume-download-btn:hover { background: rgba(255,255,255,0.1); }
.resume-download-btn *,
.resume-download-btn svg { color: var(--primary); fill: var(--primary); stroke: var(--primary); }
.theme-light .app-content #resume .resume-download-btn { background: rgba(255,255,255,0.95) !important; border-color: rgba(173,43,238,0.5) !important; color: #ad2bee !important; }
.theme-light .app-content #resume .resume-download-btn:hover { background: rgba(255,255,255,1) !important; border-color: rgba(173,43,238,0.7) !important; color: #ad2bee !important; }
.theme-light .app-content #resume .resume-download-btn,
.theme-light .app-content #resume .resume-download-btn *,
.theme-light .app-content #resume .resume-download-btn svg { color: #ad2bee !important; fill: #ad2bee !important; stroke: #ad2bee !important; }
body.theme-light .app-content #resume a.resume-download-btn.glass { color: #ad2bee !important; }
body.theme-light .app-content #resume a.resume-download-btn.glass *,
body.theme-light .app-content #resume a.resume-download-btn.glass svg { color: #ad2bee !important; fill: #ad2bee !important; stroke: #ad2bee !important; }

/* ========== Contact ========== */
.section-contact { padding: 6rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.05); max-width: 80rem; margin: 0 auto; }
.contact-grid { display: grid; gap: 4rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.contact-title { font-size: 2.25rem; font-weight: 700; line-height: 1.2; margin: 0 0 1rem; font-family: var(--font-display); }
@media (min-width: 768px) { .contact-title { font-size: 3rem; } }
.contact-desc { font-size: 1.125rem; line-height: 1.6; margin: 0 0 2rem; }
.contact-details { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-detail { display: flex; align-items: center; gap: 1rem; }
.contact-icon { width: 3rem; height: 3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.contact-form-wrap { padding: 2.5rem; border-radius: 1rem; position: relative; overflow: hidden; }
.contact-form-wrap .glass { padding: 2.5rem; }
.contact-message { text-align: center; padding: 2rem; }
.contact-message-icon { display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: 50%; margin-bottom: 1.5rem; }
.contact-success .contact-message-icon { background: rgba(173,43,238,0.2); color: var(--primary); }
.contact-error .contact-message-icon { background: rgba(239,68,68,0.2); color: #f87171; }
.contact-message h3 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.75rem; }
.contact-message p { margin: 0; color: #94a3b8; font-size: 1.125rem; line-height: 1.6; max-width: 24rem; margin-left: auto; margin-right: auto; }
.contact-form .form-row { display: grid; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .contact-form .form-row { grid-template-columns: 1fr 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.75rem; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: #fff; font-size: 1rem; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: rgba(255,255,255,0.1); }
.form-group input::placeholder, .form-group textarea::placeholder { color: #94a3b8; }
.theme-light .app-content .contact-form-wrap input,
.theme-light .app-content .contact-form-wrap textarea { background: rgba(0,0,0,0.06) !important; color: #0f172a !important; border-color: rgba(0,0,0,0.1) !important; }
.theme-light .app-content .contact-form-wrap input::placeholder,
.theme-light .app-content .contact-form-wrap textarea::placeholder { color: #64748b !important; }
.btn-submit { width: 100%; padding: 1rem; margin-top: 1rem; background: var(--primary); color: #fff; font-weight: 700; border: none; border-radius: 0.5rem; cursor: pointer; box-shadow: 0 10px 15px -3px rgba(173,43,238,0.2); transition: opacity 0.2s; }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.spinner { display: inline-block; width: 1.25rem; height: 1.25rem; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; margin-right: 0.25rem; }
.link-btn { background: none; border: none; color: var(--primary); font-weight: 500; cursor: pointer; text-decoration: underline; }

/* ========== Footer ========== */
.footer { padding: 3rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.05); margin-top: auto; }
.footer-inner { max-width: 80rem; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
@media (min-width: 768px) { .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-brand { display: flex; align-items: center; gap: 0.5rem; }
.footer-logo-icon { width: 20px; height: 20px; color: var(--primary); }
.footer-copy { font-size: 0.875rem; color: #64748b; margin: 0; }
.footer-link { font-size: 0.875rem; color: #94a3b8; text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: #fff; }

/* ========== Modal ========== */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; padding: 1.5rem; }
.modal-overlay[aria-hidden="false"] { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,10,12,0.8); backdrop-filter: blur(4px); cursor: pointer; }
.modal-box { position: relative; width: 100%; max-width: 56rem; max-height: 90vh; border-radius: 1.5rem; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
.modal-close { position: absolute; top: 1.5rem; right: 1.5rem; z-index: 10; padding: 0.5rem; border-radius: 50%; background: rgba(255,255,255,0.05); border: none; color: #fff; cursor: pointer; transition: background 0.2s; }
.modal-close:hover { background: rgba(255,255,255,0.1); }
.modal-body { display: grid; grid-template-columns: 1fr; max-height: 90vh; overflow: hidden; }
@media (max-width: 767px) {
  .modal-body { display: block; overflow-y: auto; overflow-x: hidden; max-height: 85vh; -webkit-overflow-scrolling: touch; }
}
@media (min-width: 768px) { .modal-body { grid-template-columns: 1fr 1fr; } }
.modal-gallery-side { padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 767px) { .modal-gallery-side { overflow: visible; } }
.modal-gallery-label { font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.5rem; }
.modal-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.modal-gallery img, .modal-gallery button { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 0.5rem; cursor: pointer; border: none; padding: 0; background: none; }
.modal-main-image-wrap { width: 100%; aspect-ratio: 16/10; border-radius: 0.75rem; overflow: hidden; cursor: pointer; border: none; padding: 0; background: none; }
.modal-main-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.modal-content-side { padding: 2rem; overflow-y: auto; }
@media (max-width: 767px) { .modal-content-side { overflow: visible; padding-bottom: 3rem; } }
@media (min-width: 768px) { .modal-content-side { padding: 3rem; } }
.modal-category { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.75rem; display: block; }
.modal-title { font-size: 1.875rem; font-weight: 700; color: #fff; margin: 0 0 1.5rem; font-family: var(--font-display); }
.modal-overview h4, .modal-process h4 { font-size: 0.875rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.75rem; }
.modal-overview p, .modal-process li { color: #cbd5e1; line-height: 1.6; font-size: 0.875rem; }
.modal-process ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.modal-process li { display: flex; align-items: center; gap: 0.75rem; }
.modal-process li::before { content: ''; width: 20px; height: 20px; flex-shrink: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ad2bee'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E") no-repeat center; }
.btn-full-details { width: 100%; padding: 1rem; background: var(--primary); color: #fff; font-weight: 700; border: none; border-radius: 0.75rem; cursor: pointer; margin-top: 1rem; transition: background 0.2s; }
.btn-full-details:hover { background: rgba(173,43,238,0.8); }

/* Modo claro: modal com fundo claro e fontes legíveis (modal fica fora de .app-content) */
.theme-light .modal-overlay .modal-box.glass { background: rgba(255,255,255,0.98) !important; border: 1px solid rgba(0,0,0,0.08); }
.theme-light .modal-overlay .modal-title { color: #0f172a !important; }
.theme-light .modal-overlay .modal-category { color: #ad2bee !important; }
.theme-light .modal-overlay .modal-gallery-label { color: #64748b !important; }
.theme-light .modal-overlay .modal-overview h4,
.theme-light .modal-overlay .modal-process h4 { color: #475569 !important; }
.theme-light .modal-overlay .modal-overview p,
.theme-light .modal-overlay .modal-process li { color: #334155 !important; }
.theme-light .modal-overlay .modal-close { background: rgba(0,0,0,0.06) !important; color: #0f172a !important; }
.theme-light .modal-overlay .modal-close:hover { background: rgba(0,0,0,0.1) !important; }
.theme-light .modal-overlay .modal-close svg { stroke: #0f172a !important; }
.theme-light .modal-overlay .btn-full-details { background: #ad2bee !important; color: #fff !important; }
.theme-light .modal-overlay .btn-full-details:hover { background: rgba(173,43,238,0.85) !important; }

/* ========== Lightbox ========== */
.lightbox-overlay { display: none; position: fixed; inset: 0; z-index: 110; align-items: center; justify-content: center; background: rgba(0,0,0,0.95); padding: 1rem; overflow: auto; }
.lightbox-overlay[aria-hidden="false"] { display: flex; }
.lightbox-backdrop { position: fixed; inset: 0; cursor: pointer; }
.lightbox-content { position: relative; min-height: 100%; min-width: 100%; display: flex; align-items: center; justify-content: center; padding-top: 4rem; }
.lightbox-btn, .lightbox-close { position: fixed; top: 4rem; right: 1rem; z-index: 120; padding: 0.5rem; border-radius: 50%; background: rgba(255,255,255,0.1); border: none; color: #fff; cursor: pointer; transition: background 0.2s; }
.lightbox-btn { right: 4rem; text-decoration: none; }
.lightbox-btn:hover, .lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-img { max-width: 95vw; max-height: 95vh; width: auto; height: auto; object-fit: contain; border-radius: 0.5rem; display: block; }

/* ========== Celebration ========== */
.celebration-overlay { display: none; position: fixed; inset: 0; z-index: 200; pointer-events: none; overflow: hidden; }
.celebration-overlay[aria-hidden="false"] { display: block; animation: fadeIn 0.4s ease; }
.celebration-backdrop { position: absolute; inset: 0; background: rgba(10,10,12,0.6); backdrop-filter: blur(2px); }
.celebration-particles { position: absolute; inset: 0; }
.celebration-particle { position: absolute; border-radius: 50%; bottom: 0; animation: particleUp 2.5s ease-out forwards; }
@keyframes particleUp {
  0% { transform: translateY(0) scale(0.3); opacity: 0; }
  20% { opacity: 0.9; }
  80% { opacity: 0.9; }
  100% { transform: translateY(-120vh) scale(1); opacity: 0; }
}
.celebration-glow { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.celebration-glow::after { content: ''; width: min(80vw, 400px); height: min(80vw, 400px); border-radius: 50%; background: rgba(173,43,238,0.2); filter: blur(60px); animation: glowPulse 0.8s ease-out forwards; }
@keyframes glowPulse { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1.2); opacity: 0.4; } }

/* ========== Theme light overrides (cores/leitura iguais ao React) ========== */
.theme-light .app-content .text-slate-400 { color: #475569 !important; }
.theme-light .app-content .text-slate-300 { color: #334155 !important; }
.theme-light .app-content .text-slate-500 { color: #64748b !important; }
.theme-light .app-content .text-slate-200 { color: #1e293b !important; }
.theme-light .app-content button,
.theme-light .app-content button *,
.theme-light .app-content a[class*="bg-primary"],
.theme-light .app-content a[class*="bg-primary"] * { color: #fff !important; }
.theme-light .app-content #resume { color: #0f172a !important; }
.theme-light .app-content #resume h2,
.theme-light .app-content #resume h4,
.theme-light .app-content #resume p,
.theme-light .app-content #resume time,
.theme-light .app-content #resume span:not([class*="bg-primary"]) { color: #0f172a !important; }
.theme-light .app-content #resume .text-primary,
.theme-light .app-content #resume time.text-primary,
.theme-light .app-content #resume span.text-primary { color: #ad2bee !important; }
/* Hero: subtítulo e badge legíveis no modo claro */
.theme-light .app-content .hero-subtitle { color: #475569 !important; }
.theme-light .app-content .hero-title,
.theme-light .app-content .hero-badge { color: inherit; }
.theme-light .app-content .hero-title .text-primary,
.theme-light .app-content .hero-title .gradient-text { color: #ad2bee !important; }

/* Nav desktop: links escuros no modo claro */
.theme-light .app-content .nav-desktop a { color: #334155 !important; }
.theme-light .app-content .nav-desktop a:hover { color: #0f172a !important; }

/* Mobile menu: painel claro e links escuros */
.theme-light .app-content .mobile-menu-panel {
  background: rgba(255,255,255,0.75) !important;
  border-color: rgba(0,0,0,0.08) !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.08);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.theme-light .app-content .mobile-menu-link { color: #334155 !important; }
.theme-light .app-content .mobile-menu-link:hover { color: #0f172a !important; background: rgba(0,0,0,0.04) !important; }
.theme-light .app-content .mobile-menu-whatsapp,
.theme-light .app-content .mobile-menu-whatsapp * { color: #fff !important; }

/* Works: títulos da section e cards */
.theme-light .app-content #works .section-title { color: #0f172a !important; }
.theme-light .app-content #works .card-case-study-btn:hover { background: rgba(173,43,238,0.85) !important; }

/* Resume: glass dos cards e dots */
.theme-light .app-content #resume .glass,
.theme-light .app-content #resume .timeline-card { background: rgba(255,255,255,0.9) !important; border-color: rgba(0,0,0,0.08) !important; }
.theme-light .app-content #resume .timeline-card:hover { background: rgba(255,255,255,0.95) !important; }
.theme-light .app-content #resume .timeline-dot { background: rgba(0,0,0,0.15) !important; }
.theme-light .app-content #resume .section-title { color: #0f172a !important; }

/* Contact: títulos, descrição, labels e mensagens */
.theme-light .app-content .contact-title { color: #0f172a !important; }
.theme-light .app-content .contact-title .text-primary { color: #ad2bee !important; }
.theme-light .app-content .contact-desc { color: #475569 !important; }
.theme-light .app-content .contact-detail span { color: #334155 !important; }
.theme-light .app-content .contact-form-wrap.glass,
.theme-light .app-content .contact-form-wrap .glass { background: rgba(255,255,255,0.9) !important; border-color: rgba(0,0,0,0.08) !important; }
.theme-light .app-content .form-group label { color: #64748b !important; }
.theme-light .app-content .contact-message h3 { color: #0f172a !important; }
.theme-light .app-content .contact-message p { color: #475569 !important; }
.theme-light .app-content .contact-form-wrap input::placeholder,
.theme-light .app-content .contact-form-wrap textarea::placeholder { color: #64748b !important; opacity: 1; }

/* Input de IA no modo claro: sem fundo, texto escuro */
.theme-light .app-content .ai-input { background: transparent !important; border-color: transparent !important; color: #0f172a !important; }
.theme-light .app-content .ai-input::placeholder { color: #64748b !important; }
.theme-light .app-content .ai-response { border-color: rgba(173,43,238,0.2); background: rgba(255,255,255,0.9) !important; }
.theme-light .app-content .ai-response-text { color: #334155 !important; }
.theme-light .app-content .ai-response-header h4 { color: #ad2bee !important; }
.theme-light .app-content .ai-response-header p { color: #64748b !important; }
.theme-light .app-content .btn-dismiss { color: #475569 !important; }
.theme-light .app-content .btn-dismiss:hover { color: #0f172a !important; }

/* Footer: texto escuro no modo claro */
.theme-light .app-content .footer .site-name { color: #0f172a !important; }
.theme-light .app-content .footer-copy { color: #475569 !important; }
.theme-light .app-content .footer-link { color: #334155 !important; }
.theme-light .app-content .footer-link:hover { color: #0f172a !important; }

/* Bordas e divisórias no modo claro */
.theme-light .app-content .section-resume,
.theme-light .app-content .section-contact,
.theme-light .app-content .footer { border-top-color: rgba(0,0,0,0.08) !important; }
.theme-light .navbar-glass-inner { background: rgba(255,255,255,0.85) !important; border-color: rgba(0,0,0,0.08) !important; }
