/* Base Styles */
:root {
  --primary-color: #0ea5e9;
  --secondary-color: #22d3ee;
  --dark-bg: #000000;
  --dark-bg-alt: #111827;
  --text-color: #ffffff;
  --text-muted: #9ca3af;
  --card-bg: #1e293b;
  --border-color: #1e40af;
  --gradient: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  
  /* Light theme variables */
  --light-bg: #f8fafc;
  --light-bg-alt: #e2e8f0;
  --light-card-bg: #ffffff;
  --light-text: #0f172a;
  --light-text-muted: #64748b;
  --light-border: #bae6fd;
}

/* Theme Classes */
.dark {
  --bg: var(--dark-bg);
  --bg-alt: var(--dark-bg-alt);
  --card-bg: var(--card-bg);
  --text: var(--text-color);
  --text-muted: var(--text-muted);
  --border: var(--border-color);
}

.light {
  --bg: var(--light-bg);
  --bg-alt: var(--light-bg-alt);
  --card-bg: var(--light-card-bg);
  --text: var(--light-text);
  --text-muted: var(--light-text-muted);
  --border: var(--light-border);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg, var(--dark-bg));
  color: var(--text, var(--text-color));
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

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

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

/* Buttons */
.primary-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.primary-btn:hover {
  background: #0284c7;
}

.outline-btn {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

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

.submit-btn {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s;
  width: 100%;
}

.submit-btn:hover {
  opacity: 0.9;
}

.center-btn {
  text-align: center;
  margin-top: 2rem;
}

.icon-btn {
  background: transparent;
  color: var(--text, var(--text-color));
  border: 1px solid var(--border, var(--border-color));
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1rem;
}

.icon-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: background-color 0.3s, border-color 0.3s;
}

.dark nav {
  background-color: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(30, 64, 175, 0.3);
}

.light nav {
  background-color: rgba(248, 250, 252, 0.8);
  border-bottom: 1px solid rgba(14, 165, 233, 0.3);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-links a {
  color: var(--text, var(--text-color));
  transition: color 0.3s;
}

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

.nav-buttons {
  display: flex;
  gap: 1rem;
}

/* Hero Section */
.hero {
  padding: 10rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, rgba(40, 120, 200, 0.2), transparent 60%);
  z-index: 0;
}

.light .hero::before {
  background: radial-gradient(circle at 30% 30%, rgba(40, 120, 200, 0.1), transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero h2 {
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

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

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

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--text, var(--text-color));
}

/* About Section */
.about {
  padding: 5rem 0;
  background-color: var(--bg-alt, var(--dark-bg-alt));
  transition: background-color 0.3s;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  width: 80%;
  position: relative;
}

.image-container {
  position: relative;
  z-index: 1;
  border: 2px solid var(--primary-color);
  border-radius: 1rem;
  overflow: hidden;
}

.about-image::after {
  content: '';
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 100%;
  height: 100%;
  background: var(--gradient);
  border-radius: 1rem;
  z-index: 0;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  color: var(--text-muted);
}

/* Skills Section */
.skills {
  padding: 5rem 0;
  background-color: var(--bg, var(--dark-bg));
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s;
}

.skills::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 70% 70%, rgba(40, 120, 200, 0.1), transparent 60%);
  z-index: 0;
}

.light .skills::before {
  background: radial-gradient(circle at 70% 70%, rgba(40, 120, 200, 0.05), transparent 60%);
}

.skills .container {
  position: relative;
  z-index: 1;
}

.skills-category {
  margin-bottom: 4rem;
}

.skills-category h3 {
  font-size: 1.8rem;
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.skill-card {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.1);
}

.light .skill-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(34, 211, 238, 0.05));
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.05);
}

.skill-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  transition: transform 0.3s;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.2);
  border-color: rgba(14, 165, 233, 0.6);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(34, 211, 238, 0.2));
}

.light .skill-card:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(34, 211, 238, 0.1));
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.1);
}

.skill-card:hover i {
  transform: scale(1.1);
}

.skill-card svg {
  width: 39px;
  height: 39px;
  fill: #3fa2ee; /* cor azul típica do C/C++ */
}

.tooltip {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  white-space: nowrap;
  z-index: 10;
}

.tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 5px 5px 5px;
  border-style: solid;
  border-color: transparent transparent var(--primary-color) transparent;
}

.skill-card:hover .tooltip {
  opacity: 1;
  visibility: visible;
  bottom: -35px;
}

/* Projects Section */
.projects {
  padding: 5rem 0;
  background-color: var(--bg-alt, var(--dark-bg-alt));
  transition: background-color 0.3s;
}

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

.project-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid transparent;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.2);
  border-color: var(--primary-color);
}

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

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

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

.project-links {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.project-link {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.3s;
}

.project-link:hover {
  background: rgba(14, 165, 233, 0.7);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

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

.project-tags span {
  background-color: rgba(14, 165, 233, 0.2);
  color: var(--primary-color);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
}

/* Contact Section */
.contact {
  padding: 5rem 0;
  background-color: var(--bg, var(--dark-bg));
  transition: background-color 0.3s;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-item i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background-color: var(--card-bg);
  border: 1px solid var(--border, var(--border-color));
  border-radius: 6px;
  color: var(--text, var(--text-color));
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Footer */
footer {
  padding: 2rem 0;
  background-color: var(--bg-alt, var(--dark-bg-alt));
  border-top: 1px solid var(--border, var(--border-color));
  transition: background-color 0.3s, border-color 0.3s;
}

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

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-social a:hover {
  color: var(--primary-color);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--card-bg);
  margin: 10% auto;
  padding: 0;
  width: 90%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border, var(--border-color));
}

.modal-header h3 {
  margin: 0;
  color: var(--text, var(--text-color));
}

.close-modal {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s;
}

.close-modal:hover {
  color: var(--primary-color);
}

.modal-body {
  padding: 1.5rem;
}

.language-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.language-item {
  margin-bottom: 0.5rem;
}

.language-item button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid var(--border, var(--border-color));
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text, var(--text-color));
  text-align: left;
}

.language-item button:hover {
  background-color: rgba(14, 165, 233, 0.1);
  border-color: var(--primary-color);
}

.language-item.active button {
  background-color: rgba(14, 165, 233, 0.2);
  border-color: var(--primary-color);
}

.flag {
  margin-right: 1rem;
  font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    margin-bottom: 2rem;
  }
  
  .nav-links {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero h2 {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1.5rem;
  }
  
  .skill-card {
    width: 80px;
    height: 80px;
  }
  
  .skill-card i {
    font-size: 2rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .stats {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

.language-select-container {
  position: relative;
  margin-left: 10px;
}

#language-select {
  appearance: none;
  background-color: transparent;
  color: var(--text, var(--text-color));
  border: 1px solid var(--border, var(--border-color));
  border-radius: 6px;
  padding: 8px 30px 8px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

#language-select:hover {
  border-color: var(--primary-color);
}

#language-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.language-select-container::after {
  content: '\f0d7';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
