/* GERAL E PALETA DE CORES */
:root {
    --bg-color: #f4f7fc;
    --secondary-bg-color: #ffffff;
    --dark-bg-color: #0d244f;
    --light-blue-gradient: #3a5a9b; 
    --text-color: #333a45;
    --text-secondary-color: #5a6578;
    --primary-color: #005ae0;
    --secondary-color: #0041a3;
    --border-color: #e2e8f0;
    --header-height: 5rem;
    --card-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background-color: var(--secondary-bg-color); color: var(--text-color); line-height: 1.6; }
h1, h2, h3 { font-weight: 600; }
img { max-width: 100%; height: auto; display: block; }
main { z-index: 1; position: relative; }
section { padding: 6rem 8%; position: relative; overflow: hidden; }

/* CABEÇALHO */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    padding: 0 8%;
    background-color: var(--dark-bg-color); 
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}
.header.scrolled {
    background-color: rgba(13, 36, 79, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.logo, .navbar a, .menu-icon box-icon {
    color: #ffffff;
    fill: #ffffff;
}
.logo { font-size: 1.5rem; font-weight: 700; text-decoration: none;}
.navbar { display: flex; align-items: center; gap: 2rem; }
.navbar a { font-size: 1rem; font-weight: 500; transition: color 0.3s ease; opacity: 0.8; position: relative; text-decoration: none; }
.navbar a:hover, .navbar a.active { opacity: 1; }
.navbar a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--primary-color); transition: width 0.3s ease; }
.navbar a.active::after { width: 100%; }
.menu-icon { display: none; cursor: pointer; }

/* SEÇÃO HOME (DESKTOP) */
.home {
    display: flex;
    min-height: 100vh;
    width: 100%;
    padding: var(--header-height) 8% 4%;
    background-color: var(--dark-bg-color);
    align-items: center;
    gap: 2rem;
}
.home-left-panel {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
}
.home-right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start; 
}
.home-content { max-width: 550px; color: #ffffff; }
.home-content h1 { font-size: 3.5rem; line-height: 1.2; }
.home-content h3 { font-size: 1.5rem; color: var(--primary-color); margin: 0.5rem 0 1.5rem 0; font-weight: 500; }
.home-content p { font-size: 1rem; color: rgba(255, 255, 255, 0.8); margin-bottom: 2.5rem; }

.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn { display: inline-block; padding: 0.8rem 2rem; background-color: var(--primary-color); color: #ffffff; border: 2px solid var(--primary-color); border-radius: 20px; font-weight: 500; transition: all 0.3s ease; text-align: center; }
.btn:hover { transform: translateY(-3px); background-color: var(--secondary-color); border-color: var(--secondary-color); }
.btn-secondary { background-color: transparent; color: #ffffff; border-color: #ffffff; }
.btn-secondary:hover { background-color: #ffffff; color: var(--dark-bg-color); }

.home-img { 
    
    max-width: 500px; 
    width: 100%; 
    display: flex;
    justify-content: center;
    align-items: center;
}
.home-img img {
    width: 100%;
    height: auto;
    filter: drop-shadow(4px 0 0 white) drop-shadow(-4px 0 0 white) drop-shadow(0 4px 0 white) drop-shadow(0 -4px 0 white);
}


/* --- DEMAIS SEÇÕES --- */
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 4rem; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: var(--primary-color); border-radius: 2px; }

/* SEÇÃO Sobre */
.about, #academic-projects { background-color: var(--secondary-bg-colorr); }
.about-container { display: flex; align-items: center; justify-content: center; gap: 5rem; max-width: 1100px; margin: 0 auto; }
.about-image { flex: 1; max-width: 400px; }
.about-image img { border-radius: 15px; box-shadow: var(--card-shadow); }
.about-text { flex: 1.2; }
.about-text p { font-size: 1.20rem; }

/* SEÇÃO Sobre  Habilidades */
.skills { background-color: var(--bg-color); }
.skills-grid, .softskills-grid { display: grid; gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.skills-grid { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.softskills-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.softskills-title { margin-top: 5rem; }
.skill-card, .softskill-card { background-color: var(--secondary-bg-color); padding: 1.5rem; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--border-color); box-shadow: var(--card-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.skill-card:hover, .softskill-card:hover { transform: translateY(-8px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.softskill-card { align-items: flex-start; text-align: left; justify-content: flex-start; }
.softskill-card h3 { margin-bottom: 0.5rem; }
.skill-card box-icon { width: 45px; height: 45px; margin-bottom: 1rem; }

/* SEÇÃO Projetos/Demos */
.projects { background-color: var(--bg-color); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(600px, 1fr)); gap: 2rem; }
.project-card { background-color: var(--secondary-bg-color); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--card-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.project-card:hover { transform: translateY(-8px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.project-card img { width: 100%; height: 250px; object-fit: fill; } 
.project-info { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-info h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.project-info p { flex-grow: 1; margin-bottom: 1.5rem; }
.project-links a { margin-right: 1rem; font-weight: 600; font-size: 0.9rem; }
.demo iframe {width: 100%;height: auto;aspect-ratio: 16 / 9;border-radius: 8px;border: none;}
.demo .carousel { width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid #ddd; }
.carousel-item { height: auto; background-color: transparent;}
.carousel-item img { width: 100%; height: auto; object-fit: initial; }
.carouselExampleIndicators { max-width: 560px; margin: 0 auto; }
.demo { max-width: 800px; width: 100%;margin: 2rem auto;}
.demo .carousel { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 8px; border: none;}
.carousel-item, .carousel-inner {height: 100%; }
.carousel-item img { height: 100%; width: 100%; object-fit: cover;}

/* SEÇÃO Contato */
.contact { background-color: var(--secondary-bg-color); }
.contact-container { display: flex; align-items: center; justify-content: center; gap: 5rem; max-width: 1200px; margin: 0 auto; }
.contact-text { flex: 1.2; }
.contact-text p { font-size: 1.20rem; }
.contact-images { flex: 1; display: flex; gap: 1.5rem; align-items: center; }
.contact-images img { border-radius: 12px; width: 50%; transition: transform 0.3s ease; }
.contact-images img:hover { transform: scale(1.05); }
.contact-buttons { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.contact-buttons .btn { flex-grow: 0; }
.contact-buttons .btn-secondary { color: var(--primary-color); border-color: var(--primary-color); }
.contact-buttons .btn-secondary:hover { background-color: var(--primary-color); color: #ffffff; }


/* SEÇÃO Rodapé */
.footer {
    padding: 2rem 8%;
    background-color: var(--bg-color);
    text-align: center;
    color: var(--dark-bg-color);
}
.footer p { color: var(--dark-bg-color); }
.footer .social-links { margin-top: 1rem; display: flex; justify-content: center; gap: 1.5rem; }
.footer .social-links a box-icon { width: 24px; height: 24px; transition: fill 0.3s ease, transform 0.3s ease; fill: var(--dark-bg-color); }
.footer .social-links a:hover box-icon { fill: var(--dark-bg-color); transform: scale(1.2); }

/* Animação para o ícone do celular */ 
@keyframes rotatePhone {
        0%, 100% { transform: rotate(0deg); }
        25% { transform: rotate(90deg); }
        50% { transform: rotate(90deg); }
        75% { transform: rotate(0deg); }
    }
.turn-phone-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); color: white;
    z-index: 9999; flex-direction: column; justify-content: center; align-items: center; text-align: center; font-family: sans-serif; padding: 20px; }
.turn-phone-content { display: flex; flex-direction: column; align-items: center;}
.phone-icon { width: 60px; height: 120px; border: 5px solid white; border-radius: 10px; position: relative; margin-bottom: 20px; animation: rotatePhone 2s ease-in-out infinite;}
.phone-icon::before { content: ''; width: 5px; height: 5px; background-color: white; border-radius: 50%; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); }
.turn-phone-content p { font-size: 1.2rem; line-height: 1.5; }
.close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
}

.close-button:hover,
.close-button:focus {
    opacity: 1;
}

/* RESPONSIVIDADE  */
@media (max-width: 992px) {
    section { padding: 5rem 5%; }
    .header { padding: 0 5%; }
    
    /* --- SEÇÃO HOME MOBILE --- */
    .home {
        flex-direction: column; /* Empilha os elementos */
        padding: calc(var(--header-height) + 2rem) 5% 4rem;
        gap: 3rem;
    }
    .home-left-panel, .home-right-panel {
        flex: none;
        width: 100%;
    }
    .home-right-panel {
        order: -1; 
    }
    .home-content {
        text-align: center; 
    }
    .home-content h1 { font-size: 2.8rem; }
    .btn-group { 
        justify-content: center; /
    }
    .home-img {
        
        background: radial-gradient(circle, var(--light-blue-gradient) 0%, var(--dark-bg-color) 70%);
        border-radius: 50%;
        width: 280px;  
        height: 280px;
        margin: 0 auto;
        padding: 1.5rem; 
    }
    .home-img img {
        
        filter: drop-shadow(3px 0 0 white) drop-shadow(-3px 0 0 white) drop-shadow(0 3px 0 white) drop-shadow(0 -3px 0 white);
    }
   

    .about-container, .contact-container { flex-direction: column; text-align: center; gap: 3rem; }
    .about-image { order: -1; }
    .contact-images { max-width: 450px; width: 100%; margin: 0 auto; order: -1; }
    .projects-grid { grid-template-columns: 1fr; }

    
    .contact-buttons {
        justify-content: center;
    }
    .demo{ margin: auto; display: flex; width: 500px;height: 500px;}
}

@media (max-width: 768px) {
    .menu-icon { display: block; }
    .navbar { position: absolute; top: 100%; left: -100%; width: 100%; background-color: var(--dark-bg-color); flex-direction: column; gap: 0; padding: 1rem 0; transition: left 0.4s ease-in-out; }
    .navbar.active { left: 0; }
    .navbar a { display: block; width: 100%; text-align: center; padding: 1rem; color: #ffffff; }
    .section-title { font-size: 2.2rem; }
    .navbar a.active::after { width: 0%; } 
    
    
    .home-img {
        width: 240px;
        height: 240px;
    }
    .home-content h1 {
        font-size: 2.2rem;
    }
    .demo {
    width: 100%;
    margin: 2rem auto;
    padding: 0 1rem; 
}
.demo .carousel {
    width: 100%;
    height: auto; 
    border-radius: 8px;
    border: none;
  }
  .carousel-item,
  .carousel-inner {
      height: auto;
    }
    .carousel-item img {
        width: 100%;
        height: auto;
        object-fit: contain; 
    }
} 
    @media screen and (max-width: 450px) and (orientation: portrait) {
        .turn-phone-overlay {
        display: flex;
    }
}
   