/* ===== VARIÁVEIS ===== */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --border: #30363d;
  --tag-arch: #f0883e;
  --tag-leadership: #a371f7;
  --tag-ai: #3fb950;
  --tag-lang: #58a6ff;
  --tag-cloud: #f778ba;
  --tag-db: #d2a8ff;
  --container: 1140px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 5rem 0;
}

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-title .accent {
  color: var(--accent);
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
  background: rgba(13, 17, 23, 0.95);
  border-bottom-color: var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.5px;
}

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 0 2rem;
  background: radial-gradient(ellipse at 20% 20%, rgba(88, 166, 255, 0.12), transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(88, 166, 255, 0.08), transparent 50%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-greeting {
  color: var(--accent);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.hero-name {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-role {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-summary {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 640px;
  text-align: justify;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(88, 166, 255, 0.35);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(88, 166, 255, 0.15);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background: var(--accent);
  color: #0d1117;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-sm:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(88, 166, 255, 0.3);
}

.hero-image {
  display: flex;
  justify-content: center;
}

.img-frame {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--accent), #a371f7);
  box-shadow: 0 0 30px rgba(88, 166, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease;
}

.img-frame:hover {
  box-shadow: 0 0 45px rgba(88, 166, 255, 0.6);
}

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

.hero-scroll {
  margin-top: 3rem;
}

.hero-scroll a {
  color: var(--text-secondary);
  font-size: 1.4rem;
  animation: bounce 2s infinite;
  display: inline-block;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.skill-card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.skill-icon {
  font-size: 1.3rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0d1117;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.timeline-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.timeline-company {
  display: block;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline-period {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(88, 166, 255, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.timeline-period i {
  margin-right: 0.3rem;
}

.timeline-desc {
  list-style: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.timeline-desc li {
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.45rem;
}

.timeline-desc li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.project-banner {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-body h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.project-body p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.project-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #0d1117;
  background: var(--tag-ai);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.project-tag-warn {
  background: #f0b429;
}

.project-links {
  margin-top: auto;
}

/* ===== EDUCAÇÃO ===== */
.edu-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.edu-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.8rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.edu-block:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.edu-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: var(--accent);
}

.edu-title i {
  margin-right: 0.5rem;
}

.edu-list {
  list-style: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.edu-list li {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.9rem;
}

.edu-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.edu-list strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.edu-list span {
  font-size: 0.85rem;
}

/* ===== CONTATO ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.contact-card i {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.contact-card h4 {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.contact-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  word-break: break-word;
}

/* ===== FOOTER ===== */
.footer {
  background: #06090c;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-container p {
  margin-bottom: 0.25rem;
}

.footer i.fa-heart {
  color: #f85149;
}

/* ===== FADE IN ANIMATION ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

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

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .edu-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-summary {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .img-frame {
    width: 240px;
    height: 240px;
  }

  .nav-menu {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 1rem 0;
    gap: 0;
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    border-bottom: 1px solid var(--border);
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .nav-menu li {
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: 0.85rem 1rem;
  }

  .nav-link::after {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

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

  .section {
    padding: 3.5rem 0;
  }
}

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