/* ============================================================
   DESIGN SYSTEM — VARIÁVEIS E TOKENS
   ============================================================ */
:root {
  /* --- Cores base (dark theme default) --- */
  --bg:              #0b0d14;
  --bg-alt:          #10131e;
  --bg-card:         #151826;
  --border:          rgba(255, 255, 255, 0.07);
  --text:            #e2e8f0;
  --text-muted:      #8892a4;
  --primary:         #6c63ff;
  --primary-light:   #a78bfa;
  --accent:          #38bdf8;
  --gradient-main:   linear-gradient(135deg, #6c63ff 0%, #38bdf8 100%);
  --gradient-hero:   radial-gradient(ellipse at 60% 40%, rgba(108,99,255,0.25) 0%, transparent 70%),
                     radial-gradient(ellipse at 20% 80%, rgba(56,189,248,0.15) 0%, transparent 60%);
  --shadow-card:     0 8px 32px rgba(0,0,0,0.35);
  --shadow-glow:     0 0 40px rgba(108,99,255,0.3);
  --header-bg:       rgba(11,13,20,0.72);
  --nav-height:      68px;
  --radius:          14px;
  --radius-sm:       8px;
  --transition:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Light theme override --- */
[data-theme="light"] {
  --bg:           #f4f6fb;
  --bg-alt:       #eef0f8;
  --bg-card:      #ffffff;
  --border:       rgba(0, 0, 0, 0.08);
  --text:         #1a202c;
  --text-muted:   #5a6479;
  --header-bg:    rgba(244,246,251,0.82);
  --shadow-card:  0 8px 32px rgba(108,99,255,0.1);
  --shadow-glow:  0 0 40px rgba(108,99,255,0.15);
  --gradient-hero: radial-gradient(ellipse at 60% 40%, rgba(108,99,255,0.12) 0%, transparent 70%),
                   radial-gradient(ellipse at 20% 80%, rgba(56,189,248,0.08) 0%, transparent 60%);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ============================================================
   UTILITÁRIOS
   ============================================================ */
.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(108,99,255,0.12);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  border: 1px solid rgba(108,99,255,0.25);
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-muted);
  max-width: 560px;
  font-size: 1.05rem;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header .section-desc {
  margin-inline: auto;
}

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108,99,255,0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(108,99,255,0.55);
}

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

.btn-outline:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  transform: translateY(-3px);
}

.btn-icon {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: rgba(108,99,255,0.2);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

#header.scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(0,0,0,0.12);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 24px;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
}

.logo-bracket {
  color: var(--primary-light);
}

.logo-accent {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(108,99,255,0.12);
}

.nav-link.active {
  color: var(--primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--nav-height);
  overflow: hidden;
  background: var(--bg);
}

.hero-bg-glow {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  pointer-events: none;
  z-index: 0;
}

/* Animated background particles */
.hero-section::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108,99,255,0.12) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,0.1) 0%, transparent 70%);
  bottom: 0;
  left: -80px;
  animation: float 10s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 60px 0;
}

.hero-tag {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 540px;
}

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

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 999px;
  position: relative;
}

.hero-scroll-indicator span::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 2px;
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  80% { transform: translateX(-50%) translateY(14px); opacity: 0; }
}

/* ============================================================
   SOBRE
   ============================================================ */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: center;
}

.sobre-image-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  max-width: 380px;
}

.sobre-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  filter: brightness(0.95) saturate(1.1);
  transition: transform 0.5s ease;
}

.sobre-image-wrapper:hover img {
  transform: scale(1.04);
}

.image-glow {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  background: var(--gradient-main);
  z-index: -1;
  opacity: 0.6;
}

.sobre-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: var(--radius);
  z-index: 1;
  pointer-events: none;
}

.sobre-texto p {
  color: var(--text-muted);
  margin-bottom: 18px;
}

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

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}

.skill-badge:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: rgba(108,99,255,0.08);
}

.skill-badge i {
  font-size: 1rem;
}

/* ============================================================
   PROJETOS
   ============================================================ */
.projetos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card-projeto {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.card-projeto:hover {
  transform: translateY(-8px);
  border-color: rgba(108,99,255,0.35);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(108,99,255,0.1);
}

.card-imagem {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.card-imagem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-projeto:hover .card-imagem img {
  transform: scale(1.07);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11,13,20,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

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

.btn-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--gradient-main);
  color: #fff;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,99,255,0.5);
}

.card-body {
  padding: 22px 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.card-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(108,99,255,0.12);
  color: var(--primary-light);
  border: 1px solid rgba(108,99,255,0.2);
}

.card-titulo {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
}

/* ============================================================
   CONTATO
   ============================================================ */
.contato-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contato-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contato-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.contato-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.2);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: var(--primary-light);
  flex-shrink: 0;
  transition: all var(--transition);
}

.contato-item:hover .contato-icon {
  background: rgba(108,99,255,0.25);
  transform: scale(1.08);
}

.contato-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contato-link {
  font-size: 0.95rem;
  color: var(--text);
  transition: color var(--transition);
}

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

/* Form */
.contato-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

/* ============================================================
   FOOTER
   ============================================================ */
#rodape {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 28px 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-heart {
  color: #ff6b8a;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.2); }
  60% { transform: scale(1); }
  80% { transform: scale(1.1); }
}

.footer-social {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition);
}

.social-icon:hover {
  background: rgba(108,99,255,0.2);
  border-color: var(--primary-light);
  color: var(--primary-light);
  transform: translateY(-3px);
}

/* ============================================================
   ANIMAÇÕES DE SCROLL (Intersection Observer)
   ============================================================ */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.7s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.delay-1 { transition-delay: 0.15s; }
.reveal.delay-2 { transition-delay: 0.3s; }

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   HAMBURGER (mobile only - styled in mobile.css)
   ============================================================ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   TOAST FEEDBACK
   ============================================================ */
.toast-feedback {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  max-width: min(92vw, 360px);
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast-feedback.sucesso {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.35);
}

.toast-feedback.erro {
  background: rgba(255, 107, 107, 0.16);
  color: #ff9b9b;
  border-color: rgba(255, 107, 107, 0.35);
}

.toast-feedback.show {
  opacity: 1;
  transform: translateY(0);
}
