:root {
    --primary: #1c50a4;
    --secondary: #009ffd;
    --light: #f5f5f5;
    --dark: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.header {
    background: linear-gradient(135deg, #2a2a72 0%, var(--secondary) 100%);
    min-height: 100vh;
    height: auto;
    padding: clamp(1rem, 5vw, 2rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Snake animation styles */
.snake {
    position: absolute;
    height: 50px;
    width: 2px;
    background: rgba(255, 255, 255, 0.5);
    top: -50px;
    animation: moveDown var(--duration) linear;
    transform-origin: center;
    border-radius: 4px;
    filter: blur(1px);
}

@keyframes moveDown {
    from {
        transform: translateY(0) scaleY(1);
        opacity: 0;
    }

    5% {
        opacity: 0.8;
    }

    95% {
        opacity: 0.8;
    }

    to {
        transform: translateY(calc(100vh + 50px)) scaleY(0.8);
        opacity: 0;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    cursor: pointer;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    color: white;
    font-size: 2rem;
    opacity: 0.8;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-15px) translateX(-50%);
    }

    60% {
        transform: translateY(-7px) translateX(-50%);
    }
}

.content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.profile-img {
    width: clamp(150px, 30vw, 200px);
    height: clamp(150px, 30vw, 200px);
    border-radius: 50%;
    margin-bottom: 2rem;
    border: 5px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    background-color: #fff;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.tagline {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-links a {
    color: white;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    transition: transform 0.3s;
    padding: 0.5rem;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 101vh;
    padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 3vw, 2rem);
    background: var(--light);
}

.section.tecnologies {
    text-align: center;
    padding: 40px 0;
}

.tech-grid {
    min-width: 40vw;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
    justify-items: center;
}

.tech-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.tech-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: transform 0.3s ease-in-out;
}

.tech-icon img:hover {
    transform: scale(1.1);
}

.section-title {
    text-align: center;
    margin-bottom: clamp(2rem, 5vw, 4rem);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--primary);
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.projects:only-child {
    grid-template-columns: 1fr;
}

.project-link {
    transition: .2s all;
}

.project-link:hover {
    transform: scale(1.05);
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: visible;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: .3s all;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.popup-bubble {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary);
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.popup-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: var(--secondary) transparent transparent transparent;
}

.project-card:hover .popup-bubble {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}


.project-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-img {
    width: 100%;
    height: clamp(150px, 30vw, 200px);
    object-fit: cover;
}

.project-info {
    padding: clamp(1rem, 3vw, 1.5rem);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
    color: var(--primary);
}

.project-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.your-project {
    margin-top: 50px;
    max-width: 370px;
    cursor: inherit;
    user-select: none;
    animation: float 2s ease-in-out infinite;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

.contact-btn {
    text-decoration: none;
    background: var(--secondary);
    color: white;
    padding: clamp(0.3rem, 1vw, 0.5rem) clamp(0.6rem, 2vw, 1rem);
    border-radius: 20px;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    transition: .2s all;
}

.contact-btn:hover {
    opacity: .5;
}

.contact-form {
    width: min(90%, 600px);
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

input,
textarea {
    width: 100%;
    padding: clamp(0.8rem, 2vw, 1rem);
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    max-width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2rem);
    font-size: clamp(0.9rem, 2vw, 1rem);
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background: var(--secondary);
}

.language-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 1vh;
    right: 1vw;
}

.language-selector .language-toggle {
    min-width: 8vw;
    margin-bottom: 10px !important;
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 10px; /* Adicione padding para facilitar o clique */
    color: inherit; /* Use a cor de texto padrão */
}

.language-selector .language-toggle:hover {
    background: unset !important;
    opacity: 70%;
}

.language-selector .language-options {
    position: absolute;
    bottom: 100%; /* Posicione o menu acima do botão */
    right: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    color: black;
    background: #fff; /* ou sua cor de fundo */
    border: 1px solid #ccc; /* ou sua cor de borda */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10;
    min-width: 8vw; /* Use a mesma largura do botão */
}

.language-selector .language-options li {
    padding: 10px;
    cursor: pointer;
    text-align: center; /* Centralize o texto */
}

.language-selector .language-options li:hover {
    background: #f0f0f0; /* ou sua cor de hover */
}

.language-selector.active .language-options {
    display: block;
}

.warning {
    opacity: .2;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .projects {
        grid-template-columns: 1fr;
    }

    .social-links {
        gap: 0.5rem;
    }

    .skill-tag {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .project-card {
        margin: 0 auto;
        max-width: 400px;
    }

    .your-project {
        margin-top: 30px;
        max-width: 85vw;
    }
}

@media (min-width: 1200px) {
    .content {
        padding: 0 2rem;
    }

    .projects {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --light: #1a1a1a;
        --dark: #f5f5f5;
    }

    .project-card {
        background: #2d2d2d;
        color: var(--dark);
    }

    input,
    textarea {
        background: #2d2d2d;
        color: var(--dark);
        border-color: #444;
    }

    .contact-form {
        background: #2d2d2d;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.705);

    }

    100% {
        transform: translateY(0);
    }
}