* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
}

:root {
  --accent-color: #216dde;
  --text-color: #c9d1d9;
  --bg-color: #0d1117;
  --card-bg: #161b22;
  --hover-bg: #21262d;
  --border-color: #30363d;
  --max-content-width: 1200px;
  --mobile-nav-bg: rgba(22, 27, 34, 0.98);
  --secondary-text: #8b949e;
}

body {
  color: var(--text-color);
  background: linear-gradient(165deg, var(--bg-color) 60%, #0d1117 100%) fixed;
  line-height: 1.6;
  min-height: 100vh;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}

@supports (-webkit-touch-callout: none) {
  body { padding-top: env(safe-area-inset-top); }
}

/* Navegação */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--mobile-nav-bg);
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-content {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 0 1rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
  z-index: 1001;
  position: relative;
}

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

.nav-toggle {
  display: none;
  cursor: pointer;
  z-index: 1001;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.2s ease-in-out;
}

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

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-content-width);
  width: 100%;
  padding: 0 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  position: relative;
  display: flex;
  flex-direction: column;
}

.hero h1 .name {
  position: relative;
  color: var(--accent-color);
  display: inline-block;
}

.hero h1 .name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.1s ease-in-out;
}

.hero h1 .name:hover::after { width: 240px; }

.hero p {
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 2rem;
  color: var(--secondary-text);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Botões e Controles */
.hero-action-btn, .btn {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  color: var(--text-color);
  padding: 0.6rem 1.5rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s ease-in-out;
  cursor: pointer;
}

.hero-action-btn { min-width: 140px; text-align: center; }

.hero-action-btn::after, .btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(30deg);
  transition: all 0.6s ease;
}

.hero-action-btn:hover, .btn:hover {
  background: var(--hover-bg);
  border-color: var(--text-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-action-btn:hover::after, .btn:hover::after { left: 120%; }

.watermark {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15rem;
  color: rgba(201, 209, 217, 0.03);
  z-index: 0;
  user-select: none;
  pointer-events: none;
  transition: color 0.3s ease;
  display: block;
}

.watermark i {
  display: block;
  color: rgba(33, 109, 222, 0.05); /* Cor azulada para combinar com o accent-color */
}

/* Seções Comuns */
section {
  padding: 4rem 1rem;
  position: relative;
  z-index: 1;
}

.section-content {
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

#destaque, #projetos, #vantagens, #contato { scroll-margin-top: 80px; }

/* CORREÇÃO: Ajuste do espaçamento entre a seção projetos e vantagens */
#projetos {
  background: rgba(13, 17, 23, 0.8);
  padding-bottom: 2rem; /* Reduzido para aproximar o botão da próxima seção */
}

/* CORREÇÃO: Ajuste do espaçamento entre a seção vantagens e o footer */
#vantagens {
  background: rgba(13, 17, 23, 0.8);
  padding-top: 3rem; /* Reduzido ligeiramente */
  padding-bottom: 6rem; /* Aumentado para dar mais espaço antes do footer */
  margin-bottom: 2rem; /* Adiciona espaço extra antes do footer */
}

/* Cards (Projetos) */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
  height: 100%;
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
    rgba(33, 109, 222, 0.2), 
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img { transform: scale(1.05); }

.project-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  height: calc(100% - 200px);
  position: relative;
}

.project-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  padding-right: 1.5rem;
  display: block;
  color: var(--text-color);
}

.project-title i {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-card:hover .project-title i {
  opacity: 1;
  transform: scale(1.2);
}

.project-description {
  color: var(--secondary-text);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.tag {
  background: rgba(201, 209, 217, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.8rem;
  color: var(--secondary-text);
  pointer-events: none;
}

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

/* Vantagens/Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: pointer;
}

.skill-card:hover {
  background: var(--hover-bg);
  transform: translateY(-5px);
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent-color);
}

/* Indicadores de rolagem */
.scroll-indicator {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
}

.scroll-indicator i {
  font-size: 1.5rem;
  color: rgba(201, 209, 217, 0.7);
  animation: bounce 2s infinite;
}

.scroll-indicator:active {
  transform: translateX(-50%) translateY(5px);
  transition: transform 0.2s ease-in-out;
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card-bg);
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--hover-bg);
  border-color: var(--text-color);
  transform: translateY(-3px);
}

.footer-anchor {
  padding: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
}

footer {
  margin-top: 0;
}

/* Botão Falar com Operacional */
.support-button {
  display: flex;
  justify-content: center;
  margin-top: 1rem; /* Reduzido de 2rem para 1rem */
}

.support-button .btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  background: var(--accent-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.support-button .btn i { font-size: 1.1rem; }

.support-button .btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(30deg);
  transition: all 0.6s ease;
}

.support-button .btn:hover {
  background: #1a5cb8;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.support-button .btn:hover::after { left: 120%; }

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

.bus-icon {
  position: relative;
  margin-left: 5px;
  font-size: 0.8em;
}

.road-reflection {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

/* Responsividade - NOVO Menu Mobile em formato de dropdown */
@media (max-width: 768px) {
  .nav-toggle { 
    display: block; 
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: auto;
    background: var(--card-bg);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin-top: 5px;
    max-height: 0;
    overflow: hidden;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    max-height: 300px;
    padding: 0.5rem 0;
  }

  .nav-links a {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a:hover {
    background: var(--hover-bg);
  }

  .nav-links a::after {
    display: none;
  }

  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1rem; }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-action-btn { width: 100%; }
  .watermark { font-size: 8rem; right: 0; }
  .section-title { font-size: 1.75rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
}