/* =====================
   VARIÁVEIS
===================== */
:root {
  --primary: #6b36c8;
  --primary-dark: #441f88;
  --primary-light: #9a7bd1;

  --bg: #f5f6fa;
  --white: #ffffff;
  --text: #2e2e2e;
  --text-light: #6b6b6b;
}

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


/* =====================
   BASE
===================== */
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* =====================
   HEADER
===================== */
.header {
  background: var(--white);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  border-bottom: 1px solid #eaeaea;
}

.logo {
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
}

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

.nav-links a {
  color: var(--text);
  font-weight: 600;
  opacity: 0.85;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
  opacity: 1;
}

.nav-links a.active {
  color: var(--primary);
  font-weight: 700;
}

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

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


/* =====================
   HERO
===================== */
.hero {
  background: linear-gradient(135deg,
      rgba(154, 123, 209, 0.12),
      #ffffff);
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  margin: 2rem auto;
  max-width: 900px;

  display: flex;
  align-items: center;
  gap: 2.5rem;
}

/* FOTO À ESQUERDA */
.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(156, 115, 228, 0.5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hero-text h1 {
  font-size: 1.5rem;
  color: var(--primary-dark);
}

.hero-text h2 {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.2rem;
  /* quase colado no texto */
}

.hero-text p {
  font-size: 0.9rem;
  color: var(--text-light);
  max-width: 480px;

}


/* =====================
   BOTÃO
===================== */
.btn {
  margin-top: 1rem;
  width: fit-content;
  background: var(--primary);
  color: var(--white);
  padding: 0.7rem 1.4rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* =====================
   SOBRE
===================== */
.sobre {
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.sobre h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.sobre p {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* =====================
   SKILLS
===================== */
.skills {
  max-width: 1000px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.skills h2 {
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--white);
  padding: 1.2rem;
  border-radius: 0.75rem;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.skill-card i {
  font-size: 2rem;
  color: rgba(68, 31, 136, 0.65);
  transition: color 0.3s ease, transform 0.3s ease;
}

.skill-card span {
  font-size: 0.95rem;
}


.skill-card:hover {
  color: var(--primary);
}

/* =====================
   PROJETOS
===================== */
/* =====================
   PROJETOS
===================== */
.projetos {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.projetos h2 {
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

.projetos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--white);
  padding: 1.3rem;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.project-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 0.75rem;
}

.project-card h3 {
  font-size: 1.1rem;
}

.project-card span {
  font-size: 0.9rem;
  color: var(--text-light);
}

.project-links {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
}

.project-links a {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0.55rem 0.6rem;
  border-radius: 0.6rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  border: 1px solid transparent;
  background: transparent;
}

.project-links .btn-demo {
  background: var(--primary);
  color: var(--white);
}

.project-links .btn-github {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

/* Botões em coluna no mobile */
@media (max-width: 480px) {
  .project-links {
    flex-direction: column;
  }

  .project-links a {
    width: 100%;
  }
}

/* =====================
   PROJETOS – CARROSSEL NO MOBILE
===================== */
@media (max-width: 768px) {
  .projetos-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    gap: 1rem;

    overflow-x: auto;
    padding: 0 0.5rem 0.75rem 0.5rem;

    scroll-snap-type: x mandatory;
    scroll-padding-left: 0.5rem;
    scroll-padding-right: 0.5rem;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .projetos-grid::-webkit-scrollbar {
    height: 0;
  }

  .project-card {
    scroll-snap-align: start;
    width: 100%;
    min-height: 340px;
  }

  /* reserva espaço para títulos que quebram no mobile */
  .project-card h3 {
    min-height: 2.6em;
    line-height: 1.3;
  }

  .project-card span {
    display: block;
    min-height: 1.4em;
  }
}

/* =====================
   FOOTER
===================== */
.footer {
  background: var(--white);
  border-top: 1px solid #eaeaea;
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* =====================
   RESPONSIVO
===================== */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-photo,
  .hero-text {
    order: initial;
  }
}

/* =====================
   CONTATO
===================== */

.contato {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.contato-card {
  background: linear-gradient(135deg,
      rgba(154, 123, 209, 0.12),
      #ffffff);
  border-radius: 1rem;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.contato-texto h2 {
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.contato-texto p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.contato-local {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
  margin: 0;
}

.contato-local i {
  color: rgba(68, 31, 136, 0.65);
}

/* botões */
.contato-acoes {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contato-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease;
}

.contato-btn.primary {
  background: var(--primary);
  color: var(--white);
}

.contato-btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.contato-btn.outline {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(107, 54, 200, 0.35);
  color: var(--primary-dark);
}

.contato-btn.outline:hover {
  border-color: rgba(107, 54, 200, 0.6);
  transform: translateY(-2px);
}

/* responsivo */
@media (max-width: 900px) {
  .contato-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contato-local {
    justify-content: center;
  }
}

/* =====================
   PROJETOS – CARROSSEL NO MOBILE
===================== */
@media (max-width: 480px) {
  .project-links {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .projetos-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 1rem;
    overflow-x: auto;
    padding: 0 2rem 0.75rem 0.5rem;  
    scroll-snap-type: x mandatory;
    scroll-padding: 0 2rem 0 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; 
  }

  .projetos-grid::-webkit-scrollbar {
    height: 0;
  }

  .project-card {
    width: 100%;
    scroll-snap-align: start;
  }
}

  .project-card h3 {
    min-height: 2.6em;
    line-height: 1.3;
  }

  .project-card span {
    display: block;
    min-height: 1.4em;
  }

  /* =====================
   INDICADORES DO CARROSSEL (MOBILE)
===================== */
.projetos-indicadores {
  display: none;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.projetos-indicadores .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(107, 54, 200, 0.3);
  transition: background 0.3s ease, transform 0.3s ease;
}

.projetos-indicadores .dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* só aparece no mobile */
@media (max-width: 768px) {
  .projetos-indicadores {
    display: flex;
  }
}
