/* modo light */
:root {
    --primary: #4F46E5; 
    --primary-dark: #4338ca;
    --dark: #111827;
    --light: #F9FAFB;
    --gray: #6B7280;
    --white: #FFFFFF;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

/* modo dark */
body.dark-mode {
    --dark: #F9FAFB;      
    --light: #1F2937;      
    --white: #111827;      
    --gray: #9CA3AF;       
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}


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

/*  HTML e Body */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 5rem 0;
}

.row{
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.row > .sm-12{
    grid-column: 1 / -1;
}

/* Background e Color */
.bg-light { 
    background-color: var(--light); }
.bg-dark { 
    background-color: var(--dark); 
    color: var(--white); }
.text-white { 
    color: var(--white); 
}

body.dark-mode .bg-dark {
    background: linear-gradient(to bottom, var(--white),rgb(0, 8, 54) ); 
    color: var(--dark);             
}

.highlight {
     color: var(--primary); 
}

.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

/*  Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

/*  Badges & Links */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.link-arrow {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

/*  Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0f172a; 
  display: flex;
  flex-direction: column; 
  justify-content: center;
  align-items: center;
  text-align: center; 
  z-index: 9999;
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
  opacity: 1;
  visibility: visible;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1); 
  border-top: 4px solid var(--primary); 
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loader-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: pulse 1.5s ease-in-out infinite;
}

#preloader.fadeOut {
  opacity: 0;
  visibility: hidden;
  animation: none;
}

/* Language Toggle Button */
.lang-toggle-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 990;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.lang-toggle-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Header Base */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: 70px;
    display: flex;
    align-items: center;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

body.dark-mode .header {
    background-color: rgba(17, 24, 39, 0.95);
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
}

/*  Logo */
.logo {
    font-size: 21px;
    font-weight: 700;
    text-transform: uppercase;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/*  Navigation Menu */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-menu {
    display: flex;
    gap: 2rem;
}

.header-menu a {
    font-size: 20px;
    font-weight: 500;
    color: var(--gray);
    position: relative;
}

.header-menu a:hover {
    color: var(--primary);
}

.header-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.header-menu a:hover::after {
    width: 100%;
}

/* Button parte2 */
.theme-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--dark);
    transition: var(--transition);
}

.theme-btn:hover {
    color: var(--primary);
    transform: rotate(15deg);
}

/* Mobile Menu (Hamburger) */
.menu-btn { display: none; }

.menu-icon {
    display: block;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding-top: 120px;
    padding-bottom: 60px;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--dark);
    animation: fadeInFromBottom 0.6s ease-out 0.2s both;
}

.hero-text h3{
    animation: fadeInFromBottom 0.6s ease-out 0.4s both;
}

.hero-text p {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 500px;
    animation: fadeInFromBottom 0.6s ease-out 0.6s both;
}

.hero-image-mobile {
    display: none;
}

.hero-image img,
.hero-image-mobile img {
    max-width: 90%;
    margin: 0 auto;
}

.hero-image {
    animation: fadeInFromBottom 0.6s ease-out 0.5s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInFromBottom 0.6s ease-out 0.8s both;
}

/* Skills */
.tech-stack-section {
    background-color: transparent;
    padding: 6rem 0;
    transition: background-color 0.5s ease;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.tech-card {
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

body.dark-mode .tech-card {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

body.dark-mode .tech-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.card-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    letter-spacing: 0.5px;
}

.tech-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 2rem 1rem;
    text-align: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.tech-item:hover {
    transform: scale(1.15);
}

.tech-item i {
    font-size: 2.5rem;
    transition: filter 0.3s ease;
}

.tech-item span {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
}

/*  Languages  */
.h2-carrosel{
    text-align: center; 
    margin-bottom: 20px; 
    color: gray;
}

.carousel-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 3rem;
}

.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2rem 0.5rem;
    scrollbar-width: none; 
}

.carousel::-webkit-scrollbar {
    display: none; 
}

.card {
    flex: 0 0 auto;
    width: 200px;
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: background-color 0.5s ease, color 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
    color: var(--primary);
    font-size: 1.2rem;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.prev-btn { left: 0; }
.next-btn { right: 0; }

.summary{
    display:flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

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

.project-card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: background-color 0.5s ease, color 0.5s ease, transform 0.3s ease, box-shadow 0.5s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 0.5rem;
}

.project-content p {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}


.more-projects{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
}
.more-projects a{
    font-size: 1.125rem;
    padding: 1rem 2.5rem;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.more-projects a:hover {
   background-color: #372e9e;
}

/* Contact  */
body.dark-mode section#contato {
    background: linear-gradient(to bottom, var(--white) 20%, rgb(0, 8, 54));
}

.contact-container {
    max-width: 700px;
    width: 95%;
    margin: 0 auto;
}

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

.info-card {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid transparent;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.dark-mode .info-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-circle {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.info-card:hover .icon-circle {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.info-card h3 { 
    font-size: 1.125rem; 
    color: var(--dark); 
    margin-bottom: 0.25rem;
}
.info-card p { 
    font-size: 0.9rem; 
    color: var(--gray); 
    margin: 0; 
    word-break: break-all;
}
.info-card a { 
    font-size: 0.9rem; 
    color: var(--primary); 
    text-decoration: none; 
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
}

/*  Social Links  */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: center;
}

/* 7.1. Footer Layout */
.footer {
    background-color: rgb(0, 8, 54);
    padding: 5rem 0 2rem;
    color: var(--gray);
}

.footer-content {
    text-align: center;
    justify-content: center;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-links a:hover { 
    background-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

/* 7.3. Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: var(--gray);
}

/* 8. ICON COLORS */

.tech-item .fa-html5 { color: #E34F26; }
.tech-item .fa-css3-alt { color: #1572B6; }
.tech-item .fa-js { color: #F7DF1E; }
.tech-item .fa-react { color: #61DAFB; }
.tech-item .fa-sass { color: #CC6699; }
.tech-item .fa-java { color: #007396; }
.tech-item .fa-node { color: #339933; }
.tech-item .fa-node-js { color: #ffffff; }
.tech-item .fa-git-alt { color: #F05032; }
.tech-item .fa-github,
.tech-item .devicon-linux-plain {
    color: var(--dark);
}

/* SCROLL ANIMATIONS */
.reveal {
    position: relative;
    transform: translateY(80px);
    opacity: 0;
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

/* ANIMATIONS */

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

/* RESPONSIVE */

/*  Desktop First (min-width: 1025px) */
@media (min-width: 1025px) {
    .menu-icon { display: none; }
    .header-menu {
        display: flex;
        flex-direction: row;
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0;
        border: none;
    }
    
    .btn-nav {
        background-color: var(--primary);
        color: white !important;
        padding: 0.5rem 1.2rem;
        border-radius: 0.5rem;
    }
    .btn-nav:hover {
        background-color: var(--primary-dark);
    }

    .header-menu a.btn-nav::after {
        display: none;
    }
}

/*  Tablet & Mobile Menu (max-width: 1024px) */
@media (max-width: 1024px) {
    .menu-icon {
        display: flex;       
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 1100;
        padding: 15px;      
        width: 50px;         
        height: 50px;        
    }

    .nav-icon {
        background-color: var(--dark);
        display: block;
        height: 2px;
        width: 24px;
        position: relative;
        transition: background 0.2s;
    }

    .nav-icon::before, .nav-icon::after {
        content: "";
        background-color: var(--dark);
        display: block;
        height: 100%;
        width: 100%;
        position: absolute;
        transition: all 0.2s;
    }

    .nav-icon::before { top: -8px; }
    .nav-icon::after { top: 8px; }

    .menu-btn:checked ~ .menu-icon .nav-icon { background: transparent; }
    .menu-btn:checked ~ .menu-icon .nav-icon::before { top: 0; transform: rotate(45deg); }
    .menu-btn:checked ~ .menu-icon .nav-icon::after { top: 0; transform: rotate(-45deg); }
    .menu-btn:checked ~ .menu-icon .nav-icon::before,
    .menu-btn:checked ~ .menu-icon .nav-icon::after { background-color: #ffffff; }

    .menu-btn:checked ~ .header-menu{
        display: flex;
    }

    /* Menu Vertical (Drawer) */
    .header-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 250px; 
        height: 100vh;
        
        background-color: rgb(15, 23, 42); 
        border-left: 1px solid rgba(255, 255, 255, 0.1); 
        -webkit-font-smoothing: antialiased;
        
        flex-direction: column;
        align-items: flex-start; 
        justify-content: flex-start; 
        padding: 8rem 2.5rem 2rem; 
        gap: 0; 
        box-shadow: -20px 0 50px rgba(0,0,0,0.5); 
        z-index: 1050;
        
        /* Animação */
        transform: translateX(100%);
        transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
        opacity: 1;
        visibility: hidden; 
    }

    .menu-btn:checked ~ .header-menu {
        transform: translateX(0);
        visibility: visible; 
    }

    /* Estilo dos Links - Minimalista e Moderno */
    .header-menu a {
        width: 100%;
        text-align: left; 
        padding: 1.25rem 0;
        color: rgba(255, 255, 255, 0.7);
        font-size: 1.2rem; 
        font-weight: 400; 
        letter-spacing: -0.5px;
        transition: all 0.4s ease;
        display: block; 
    }

    .header-menu a:hover {
        background-color: transparent;
        color: #ffffff; 
        transform: translateX(10px); 
        text-shadow: none; 
    }

    .header-menu li{
        padding: 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    }
    .header-menu li:last-child {
        border-bottom: none; 
    }

    .header-menu a:last-child {
        border-bottom: none;
    }

    .header-menu a::after {
        display: block;
        bottom: 0;
    }

    .lang-toggle-btn {
        bottom: 5rem; 
    }
}

/*  Mobile General (max-width: 768px) */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-image {
        display: none;
    }

    .hero-image-mobile {
        display: block;
        margin: 1.5rem auto;
    }
    
    .carousel-wrapper {
        padding: 0 3.5rem;
        margin: 3rem auto;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }

    .card {
        padding: 1.5rem;
    }

    .carousel .card {
        width: 200px;
        flex: 0 0 auto;
        scroll-snap-align: center;
    }

    .carousel {
        scroll-snap-type: x mandatory;
    }

    /* Botão de Idioma */
    .lang-toggle-btn {
        right: 1.5rem;
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .card i {
        font-size: 2.5rem;
    }

    /* Summary Cards */
    .summary {
        padding: 0 1.5rem;
    }

    .summary .card {
        width: 100%;
        max-width: 350px;
    }

    /* Contact Info Cards */
    .contact-info {
        grid-template-columns: 1fr;
    }

    /* Tech Grid */
    .tech-grid {
        grid-template-columns: 1fr;
    }
    .tech-card {
        padding: 1.5rem;
    }
}
