:root {
    --primary-color: #e94560;
    --primary-gradient: linear-gradient(90deg, #8A2BE2, #e94560);
    --background-color: #161625;
    --card-background: #1a1a2e;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --header-bg: rgba(22, 22, 37, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-family: 'Poppins', sans-serif;
    --header-height: 5rem;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --modal-bg: rgba(0, 0, 0, 0.7);
    --modal-content-bg: #1f1f38;
}

body.light-theme {
    --background-color: #f4f4f9;
    --card-background: #ffffff;
    --text-color: #333333;
    --heading-color: #111111;
    --header-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --modal-bg: rgba(0, 0, 0, 0.5);
    --modal-content-bg: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

body.no-scroll {
    overflow: hidden;
}

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

h1, h2, h3, h4 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    transition: color 0.3s;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; text-align: center; }
p { margin-bottom: 1rem; }
a { color: var(--text-color); text-decoration: none; }

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
    color: var(--text-color);
}

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

.header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    padding: 0 2rem;
    height: var(--header-height);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s, border-bottom 0.3s;
}

.header .container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { font-size: 1.2rem; font-weight: 600; color: #ffffff; background: var(--primary-gradient); padding: 0.6rem 1.2rem; border-radius: 50px; transition: transform 0.3s ease; }
.logo:hover { transform: scale(1.05); }
.nav-list { list-style: none; display: flex; gap: 0.5rem; }
.nav-link { font-weight: 500; padding: 0.5rem 1rem; border-radius: 8px; display: flex; align-items: center; gap: 0.5rem; transition: color 0.3s ease, background-color 0.3s ease; white-space: nowrap; }
.nav-link:hover { color: var(--heading-color); }
.nav-link.active { color: white; background: var(--primary-gradient); }
.header-controls { display: flex; align-items: center; gap: 1rem; }
.theme-toggle-btn {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    color: var(--heading-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
#lang-toggle { font-size: 0.9rem; font-weight: 600; }
.hamburger { display: none; font-size: 1.5rem; background: none; border: none; color: var(--heading-color); cursor: pointer; z-index: 1001; }

.section { padding: 6rem 0; padding-top: calc(var(--header-height) + 4rem); }
.home-content { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.home-text { flex: 1; }
.home-text p { font-size: 1.2rem; max-width: 500px; }

.typing-text {
    white-space: nowrap;
}
.typing-text::after { content: '|'; animation: blink 1s infinite; color: var(--primary-color); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.social-links { margin-top: 2rem; }
.social-links a { font-size: 1.8rem; margin-right: 1.5rem; transition: color 0.3s ease, transform 0.3s ease; }
.social-links a:hover { color: var(--primary-color); transform: translateY(-3px); }
.home-image img {
    max-width: 100%;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 25px rgba(233, 69, 96, 0.4);
}

#competencias { padding-top: 0; }
.competencies-title { font-size: 1.5rem; text-align: center; margin-bottom: 2rem; }
.competencies-tags-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }
.competency-tag { background: var(--card-background); border: 1px solid var(--border-color); padding: 0.5rem 1.5rem; border-radius: 50px; font-weight: 500; transition: background-color 0.3s, color 0.3s; }
.competency-tag:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.skill-card { background: var(--card-background); padding: 2rem; border-radius: 10px; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.skill-card:hover { transform: translateY(-10px); box-shadow: 0 10px 25px rgba(138, 43, 226, 0.2); }
.skill-card-icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 1rem; }
.skill-card-title { font-size: 1.5rem; margin-bottom: 1rem; }
.skill-list { list-style: none; padding: 0; margin: 0; }
.skill-list li { margin-bottom: 0.5rem; color: var(--text-color); }
.projetos-grid-new { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.project-card-new { background: var(--card-background); border-radius: 10px; box-shadow: 0 4px 15px var(--shadow-color); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; cursor: pointer; }
.project-card-new:hover { transform: translateY(-10px); box-shadow: 0 10px 25px rgba(138, 43, 226, 0.3); }
.project-card-header { padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid var(--border-color); }
.project-card-header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.project-card-header-top h3 { font-size: 1.4rem; margin: 0; }
.project-card-header-top i { font-size: 1.2rem; }
.status-badge { font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 20px; font-weight: 500; }
.status-badge.concluido { background-color: rgba(0, 255, 127, 0.1); color: #00ff7f; }
.status-badge.em-desenvolvimento { background-color: rgba(138, 43, 226, 0.2); color: #9370db; }
.project-card-body { padding: 1rem 1.5rem; flex-grow: 1; }
.project-card-body p { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.tags span { background-color: rgba(255, 255, 255, 0.05); color: var(--text-color); padding: 0.3rem 0.8rem; border-radius: 5px; font-size: 0.8rem; font-weight: 500; }
.features-list { list-style: none; padding-left: 0; }
.features-list li { margin-bottom: 0.5rem; display: flex; align-items: flex-start; gap: 0.5rem; }
.features-list li::before { content: '•'; color: var(--primary-color); font-weight: bold; line-height: 1.6; }
.project-card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-color); color: var(--text-color); font-size: 0.9rem; }
.project-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--modal-bg); backdrop-filter: blur(5px); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.project-modal.active { opacity: 1; pointer-events: auto; }
.modal-content { background: var(--modal-content-bg); width: 90%; max-width: 1200px; height: 90vh; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); display: flex; flex-direction: column; position: relative; transform: scale(0.95); transition: transform 0.3s ease; }
.project-modal.active .modal-content { transform: scale(1); }
.modal-close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 1.8rem; color: var(--text-color); cursor: pointer; z-index: 10; }
.modal-header { padding: 2rem 3rem; background: var(--card-background); border-radius: 15px 15px 0 0; }
.modal-back-btn { color: var(--text-color); margin-bottom: 1rem; display: inline-block; }
#modal-project-title-container { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
#modal-project-title { font-size: 2.5rem; margin: 0; }
#modal-project-description { margin: 1rem 0; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; background-color: var(--primary-color); color: #ffffff; padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 600; text-align: center; transition: background-color 0.3s ease, transform 0.3s ease; border: 2px solid transparent; }
.btn:hover { background-color: #d43d51; transform: scale(1.05); }
.modal-body { display: flex; gap: 2rem; padding: 2rem 3rem; overflow-y: auto; flex-grow: 1; }
.modal-main-content { flex: 3; min-width: 0; }
.modal-sidebar { flex: 1; }
.sidebar-block { background: var(--card-background); padding: 1.5rem; border-radius: 10px; margin-bottom: 1.5rem; }
.sidebar-block h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.gallery { margin-bottom: 2rem; }
.gallery-main-image { position: relative; background-color: rgba(0, 0, 0, 0.2); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 300px; }
#gallery-current-image { width: 100%; height: auto; max-height: 60vh; display: block; object-fit: contain; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.5); color: white; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; z-index: 5; }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-counter { position: absolute; bottom: 10px; right: 10px; background: rgba(0, 0, 0, 0.7); color: white; padding: 0.2rem 0.6rem; border-radius: 5px; font-size: 0.8rem; z-index: 5; }
.gallery-thumbnails { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbnails img { width: 100px; height: 60px; object-fit: cover; border-radius: 5px; cursor: pointer; opacity: 0.6; transition: opacity 0.3s, border 0.3s; border: 2px solid transparent; }
.gallery-thumbnails img.active { opacity: 1; border-color: var(--primary-color); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.contact-card { background: var(--card-background); border-radius: 10px; padding: 1.5rem; display: flex; align-items: center; gap: 1.5rem; transition: transform 0.3s ease, background-color 0.3s; color: var(--text-color); }
.contact-card:hover { transform: translateY(-5px); background: var(--primary-gradient); color: #ffffff; }
.contact-card:hover .contact-info h3, .contact-card:hover .contact-info p { color: #ffffff; }
.contact-icon { font-size: 2rem; }
.contact-info h3 { margin-bottom: 0.25rem; font-size: 1.2rem; }
.contact-info p { margin: 0; font-size: 1rem; }
.new-footer { background-color: var(--card-background); padding: 4rem 0; margin-top: 4rem; }
.footer-container { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-col { flex: 1; min-width: 250px; }
.footer-col h3 { font-size: 1.2rem; margin-bottom: 1.5rem; color: var(--heading-color); }
.footer-col p { color: var(--text-color); opacity: 0.7; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col ul a { color: var(--text-color); transition: color 0.3s ease; }
.footer-col ul a:hover { color: var(--primary-color); }
.footer-socials { display: flex; gap: 1rem; margin-bottom: 1rem; }
.footer-socials a { background: var(--background-color); color: var(--text-color); width: 40px; height: 40px; border-radius: 8px; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; transition: background-color 0.3s, color 0.3s; }
.footer-socials a:hover { background: var(--primary-color); color: white; }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

.mobile-nav-controls {
    display: none;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    width: 80%;
    justify-content: center;
}

@media (max-width: 992px) {
    .nav-link span { display: none; }
    .nav-link { padding: 0.5rem 0.8rem; }
    .logo { font-size: 1.1rem; }
    .modal-body { flex-direction: column; }
    .home-content { flex-direction: column-reverse; text-align: center; gap: 3rem; }
    .home-text p { margin-left: auto; margin-right: auto; }
    .social-links { justify-content: center; }
    .home-image img { width: 300px; height: 300px; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }
    .nav-link span { display: inline; }
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%;
        height: 100vh;
        background: var(--card-background);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s ease-in-out, background-color 0.3s;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }
    .nav-menu.active { right: 0; }
    .nav-list { flex-direction: column; align-items: center; gap: 2rem; }
    .nav-link { font-size: 1.2rem; }
    .hamburger { display: block; }
    /* ALTERAÇÕES PARA OS BOTÕES */
    .header-controls { display: none; }
    .mobile-nav-controls { display: flex; }
    
    .home-image img { width: 280px; height: 280px; }
    .contact-grid, .skills-grid, .projetos-grid-new { grid-template-columns: 1fr; }
    .modal-content { width: 100%; height: 100%; border-radius: 0; }
    .modal-header, .modal-body { padding: 1.5rem; }
    #modal-project-title { font-size: 1.8rem; }
    .footer-container { flex-direction: column; text-align: center; }
    .footer-socials { justify-content: center; }
}

h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
  }
  h2 {
    font-size: clamp(1.4rem, 4vw, 2.5rem);
  }
  p,
  .nav-link,
  .btn,
  .modal-close-btn {
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  }
  
  p,
  h1,
  h2,
  h3,
  h4,
  a,
  li,
  span {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  
  @media (max-width: 480px) {
    h1 {
      font-size: 1.8rem;
    }
    h2 {
      font-size: 1.5rem;
    }
    .logo {
      font-size: 1rem;
      padding: 0.4rem 1rem;
    }
    .home-text p {
      font-size: 1rem;
    }
    .home-image img {
      width: 220px;
      height: 220px;
    }
    .btn {
      padding: 0.6rem 1.2rem;
      font-size: 0.9rem;
    }
    .modal-header,
    .modal-body {
      padding: 1rem;
    }
    #modal-project-title {
      font-size: 1.5rem;
    }
    .nav-link {
      font-size: 1rem;
      padding: 0.4rem 0.6rem;
    }
    .footer-col {
      min-width: 100%;
    }
  }