:root {
  --bg: #0f172a;
  --bg-alt: #111827;
  --bg-card: #1e293b;
  --accent: #38bdf8;
  --accent-dark: #0ea5e9;
  --accent-purple: #818cf8;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  --glass-bg: rgba(30, 41, 59, 0.55);
  --glass-border: rgba(56, 189, 248, 0.18);
}

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

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

/* Respeita usuários com preferência por menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  height: 60px;
  animation: preloaderPulse 1.4s ease-in-out infinite;
}

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

.preloader-bar {
  width: 160px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--gradient);
  animation: preloaderBar 1.1s ease-in-out infinite;
}

@keyframes preloaderBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ===== SCROLL PROGRESS ===== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ===== CURSOR CUSTOMIZADO ===== */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.cursor-outline {
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(56, 189, 248, 0.6);
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}

.cursor-outline.cursor-hover {
  width: 50px;
  height: 50px;
  border-color: var(--accent-purple);
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-outline { display: none; }
}

body.custom-cursor-active,
body.custom-cursor-active a,
body.custom-cursor-active button {
  cursor: none;
}

/* ===== HEADER ===== */
header {
  width: 100%;
  padding: 16px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

header.scrolled {
  background-color: rgba(17, 24, 39, 0.97);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

nav {
  display: flex;
  gap: 4px;
}

nav a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

nav a::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

nav a:hover {
  color: var(--accent);
  background-color: rgba(56, 189, 248, 0.08);
}

nav a:hover::after,
nav a.active::after {
  transform: scaleX(1);
}

nav a.active {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s;
}

.menu-toggle span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 12px; }
.menu-toggle span:nth-child(2) { top: 18px; }
.menu-toggle span:nth-child(3) { top: 24px; }

.menu-toggle.active span:nth-child(1) { top: 18px; transform: rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { top: 18px; transform: rotate(-45deg); }

.menu-toggle:hover {
  border-color: var(--accent);
}

.menu-toggle:hover span {
  background: var(--accent);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 72px;
  padding: 60px 48px;
  max-width: 1180px;
  margin: 0 auto;
}

#particles-js {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content,
.hero-image {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 580px;
  flex: 1;
}

.hero-label {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
  animation: fadeDownIn 0.7s ease both;
}

@keyframes fadeDownIn {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: 50px;
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 22px;
  color: var(--text);
}

.name-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-purple), var(--accent-dark), var(--accent));
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s linear infinite;
}

.hero h1 span#typing-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.cursor {
  display: inline-block;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: blink 0.9s step-end infinite;
  font-weight: 300;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.hero-desc strong {
  color: var(--accent);
  font-weight: 600;
}

.buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.buttons a {
  position: relative;
  overflow: hidden;
  display: inline-block;
  padding: 13px 28px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.25s;
}

.buttons a::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.buttons a:hover::after {
  left: 125%;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.28);
}

.btn-secondary {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-secondary:hover {
  background-color: rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
}

.hero-image {
  flex-shrink: 0;
}

.image-ring {
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: var(--gradient);
  padding: 4px;
  animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(56, 189, 248, 0.25), 0 0 60px rgba(129, 140, 248, 0.08); }
  50% { box-shadow: 0 0 55px rgba(56, 189, 248, 0.45), 0 0 100px rgba(129, 140, 248, 0.18); }
}

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
}

.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.7;
}

.scroll-indicator .arrow {
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50% { transform: rotate(45deg) translate(6px, 6px); opacity: 1; }
}

/* ===== SECTIONS BASE ===== */
section {
  padding: 88px 20px;
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

section h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

section h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  background: var(--gradient);
  margin: 10px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 48px;
}

/* ===== SOBRE ===== */
#sobre {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sobre-grid {
  display: flex;
  gap: 56px;
  text-align: left;
  margin-top: 36px;
  align-items: flex-start;
}

.sobre-text {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sobre-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.85;
}

.sobre-text p:first-of-type::first-letter {
  font-size: 52px;
  font-weight: 800;
  float: left;
  line-height: 0.8;
  padding: 6px 8px 0 0;
  color: var(--accent);
}

.sobre-text strong {
  color: var(--accent);
  font-weight: 600;
}

.skills-area {
  flex: 1;
}

.skills-area h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  text-align: left;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s, border-color 0.2s;
}

.skill-badge i,
.skill-badge .skill-icon {
  font-size: 15px;
  line-height: 1;
}

.skill-badge:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

/* ===== EMPRESA ===== */
.empresa-section {
  background-color: var(--bg);
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

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

.stat-number,
.stat-plus {
  font-size: 40px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.empresa-cards {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
}

.empresa-card {
  position: relative;
  z-index: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 36px 28px;
  width: 300px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

/* Borda com gradiente animado, exibida apenas no hover */
.empresa-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple), var(--accent));
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
  pointer-events: none;
}

.empresa-card:hover::before {
  opacity: 1;
  animation: gradientShift 3s linear infinite;
}

.empresa-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(56, 189, 248, 0.1);
}

.empresa-icon {
  font-size: 38px;
  margin-bottom: 16px;
  display: inline-block;
  animation: iconPulse 2.4s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.empresa-card h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.empresa-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ===== PROJETOS ===== */
#projetos {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 9px 22px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.filter-btn.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

.projects {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

.card {
  background-color: var(--bg);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: 16px;
  width: 300px;
  text-align: left;
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(24px);
  position: relative;
  overflow: hidden;
}

.card.card-hidden {
  opacity: 0 !important;
  transform: scale(0.9) !important;
  pointer-events: none;
}

.card.destaque {
  border-color: rgba(56, 189, 248, 0.35);
}

.card.destaque::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  z-index: 2;
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(56, 189, 248, 0.15);
}

.card-thumb {
  position: relative;
  height: 140px;
  margin: -28px -28px 20px -28px;
  border-radius: 15px 15px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  overflow: hidden;
}

.thumb-ia { background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(129, 140, 248, 0.25)); }
.thumb-frontend { background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.25)); }
.thumb-saas { background: linear-gradient(135deg, rgba(129, 140, 248, 0.25), rgba(236, 72, 153, 0.18)); }

.card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 17, 23, 0.9), transparent 65%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-thumb-overlay span {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.card:hover .card-thumb-overlay {
  opacity: 1;
}

.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 11px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
  line-height: 1.4;
}

.card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.75;
}

.card-techs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.card-techs span {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

/* Cores distintas por tecnologia */
.card-techs span.tech-js { color: #f7df1e; border-color: rgba(247, 223, 30, 0.35); background: rgba(247, 223, 30, 0.08); }
.card-techs span.tech-ia { color: #a78bfa; border-color: rgba(167, 139, 250, 0.35); background: rgba(167, 139, 250, 0.08); }
.card-techs span.tech-api { color: #38bdf8; border-color: rgba(56, 189, 248, 0.35); background: rgba(56, 189, 248, 0.08); }
.card-techs span.tech-html { color: #e34c26; border-color: rgba(227, 76, 38, 0.35); background: rgba(227, 76, 38, 0.08); }
.card-techs span.tech-css { color: #2965f1; border-color: rgba(41, 101, 241, 0.35); background: rgba(41, 101, 241, 0.08); }
.card-techs span.tech-node { color: #68a063; border-color: rgba(104, 160, 99, 0.35); background: rgba(104, 160, 99, 0.08); }
.card-techs span.tech-db { color: #f59e0b; border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.08); }
.card-techs span.tech-automation { color: #ec4899; border-color: rgba(236, 72, 153, 0.35); background: rgba(236, 72, 153, 0.08); }

.card-link {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s;
}

.card-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ===== CTA ===== */
.cta-section {
  background: linear-gradient(-45deg, #0f172a, #111827, #1e293b, #0f172a);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 32px;
}

.btn-cta-pulse {
  display: inline-block;
  padding: 16px 40px;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.25s ease;
  animation: ctaPulse 2.2s ease-in-out infinite;
}

.btn-cta-pulse:hover {
  transform: translateY(-3px);
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.45); }
  50% { box-shadow: 0 0 0 18px rgba(56, 189, 248, 0); }
}

/* ===== CONTATO ===== */
#contato {
  background-color: var(--bg);
}

.contato-grid {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.contato-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 28px 40px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.25s;
  min-width: 130px;
}

.contato-card svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
  transition: 0.25s;
}

.contato-card span {
  font-size: 14px;
  font-weight: 500;
}

.contato-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.15);
}

.contato-card:hover svg {
  transform: scale(1.1);
}

.contato-card.contato-github:hover { border-color: #f0f6fc; color: #f0f6fc; }
.contato-card.contato-github:hover svg { color: #f0f6fc; }
.contato-card.contato-linkedin:hover { border-color: #0A66C2; color: #0A66C2; }
.contato-card.contato-linkedin:hover svg { color: #0A66C2; }
.contato-card.contato-whatsapp:hover { border-color: #25D366; color: #25D366; }
.contato-card.contato-whatsapp:hover svg { color: #25D366; }
.contato-card.contato-email:hover { border-color: var(--accent); color: var(--accent); }

/* ===== FORMULÁRIO DE CONTATO ===== */
.contact-form {
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  position: relative;
  margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group label {
  position: absolute;
  left: 16px;
  top: 14px;
  color: var(--text-muted);
  font-size: 14px;
  padding: 0 4px;
  background: var(--bg);
  pointer-events: none;
  transition: all 0.25s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -9px;
  left: 12px;
  font-size: 11px;
  color: var(--accent);
}

.form-group.valid input,
.form-group.valid textarea {
  border-color: #22c55e;
}

.form-group.invalid input,
.form-group.invalid textarea {
  border-color: #ef4444;
}

.btn-submit {
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(3); opacity: 0; }
}

.form-feedback {
  margin-top: 14px;
  font-size: 13px;
  min-height: 18px;
}

.form-feedback.success { color: #22c55e; }
.form-feedback.error { color: #ef4444; }

/* ===== FOOTER ===== */
footer {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  margin-bottom: 4px;
}

.footer-logo-img {
  height: 34px;
  width: auto;
  display: block;
  opacity: 0.85;
}

footer p {
  font-size: 13px;
  color: var(--text-muted);
}

footer p strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== BACK TO TOP ===== */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 900;
}

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

#back-to-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== RESPONSIVO ===== */
@media (max-width: 960px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 40px;
    padding: 60px 28px;
    min-height: auto;
    padding-top: 80px;
  }

  .buttons {
    justify-content: center;
  }

  .image-ring {
    width: 200px;
    height: 200px;
  }

  .sobre-grid {
    flex-direction: column;
    gap: 32px;
  }

  .skills-area h3 {
    text-align: center;
  }

  .skills-grid {
    justify-content: center;
  }

  .stats-row {
    gap: 36px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 14px 20px;
  }

  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 62px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    gap: 4px;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  nav.open {
    display: flex;
  }

  nav a {
    padding: 10px 14px;
  }

  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 34px;
  }

  section {
    padding: 64px 16px;
  }

  section h2 {
    font-size: 26px;
  }

  .empresa-card,
  .card {
    width: 100%;
    max-width: 360px;
  }

  .projects,
  .empresa-cards,
  .contato-grid {
    flex-direction: column;
    align-items: center;
  }

  .contato-card {
    flex-direction: row;
    width: 100%;
    max-width: 360px;
    padding: 20px 24px;
    justify-content: flex-start;
  }

  .stat-number, .stat-plus {
    font-size: 32px;
  }

  #back-to-top {
    bottom: 18px;
    right: 18px;
  }
}
