:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --text-color: #333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background-color: var(--primary-color);
  color: white;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--secondary-color);
}

.hero {
  text-align: center;
  padding: 50px 20px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border-radius: 10px;
  margin: 20px 0;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid white;
  margin-bottom: 20px;
}

section {
  padding: 40px 0;
  border-bottom: 1px solid #ddd;
}

section:last-child {
  border-bottom: none;
}

h1,
h2,
h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  text-align: center;
}

h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
}

/* Estilos para a seção de Línguas e Tecnologias */
.skills-container {
  background-color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.languages-section,
.technologies-section {
  margin-bottom: 20px;
}

.languages-section h3,
.technologies-section h3 {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 1.3rem;
  text-align: center;
}

.flags-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

.flag-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flag-icon {
  width: 40px;
  height: 25px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tech-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.tech-item {
  background-color: var(--light-color);
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 500;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.tech-item:hover {
  background-color: var(--secondary-color);
  color: white;
  transform: translateY(-3px);
}

/* Projects Section */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.project-card {
  perspective: 1000px;
  height: 400px;
}

.project-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.project-card:hover .project-inner {
  transform: rotateY(180deg);
}

.project-front,
.project-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-front {
  background-color: white;
  display: flex;
  flex-direction: column;
}

.project-image {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.project-info {
  padding: 20px;
  flex-grow: 1;
}

.project-back {
  background-color: var(--primary-color);
  color: white;
  transform: rotateY(180deg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.project-links {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
}

.project-link {
  color: white;
  background-color: var(--secondary-color);
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
}

.project-link:hover {
  background-color: var(--accent-color);
}

/* Experience Section */
.experience-item {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.experience-date {
  color: #666;
  font-style: italic;
  margin-bottom: 10px;
}

/* Contact Section */
.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  background-color: white;
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.contact-item:hover {
  transform: translateY(-5px);
}

.contact-item img {
  width: 24px;
  margin-right: 10px;
}

.contact-item a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background-color: var(--primary-color);
  color: white;
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .projects-container {
    grid-template-columns: 1fr;
  }

  .project-card {
    height: auto;
  }

  .project-inner {
    height: auto;
    min-height: 400px;
    transform-style: flat;
  }

  .project-front,
  .project-back {
    position: relative;
    transform: none;
    backface-visibility: visible;
  }

  .project-card:hover .project-inner {
    transform: none;
  }

  .mobile-flip .project-back {
    display: none;
  }

  .mobile-flip.show-back .project-front {
    display: none;
  }

  .mobile-flip.show-back .project-back {
    display: flex;
  }

  .flags-container {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .tech-icons {
    gap: 10px;
  }

  .tech-item {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}
