/* Imports the Poppins font from Google fonts*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root{
    --main-color: #00eeff;
    --text-color: #ffffff;
    --bg-color-01: #1f242d;
    --bg-color-02: #323946;
    --gradient-bg: linear-gradient(135deg, #232946 0%, #1f242d 100%);
    --loader-bg: #181c24;
    --loader-fade: 0.6s;
    --color-00: #0000001a;

    /* Extra color*/
    --color-01: #999999;
    --color-02: #009539;
    --color-03: #7950f2;
    --color-04: #c00000;
    --color-05: #232323;

    /* Timeline styles - mobile-first */
    --timeline-line-color: rgba(255,255,255,0.06);
    --timeline-accent: var(--main-color);

    /* section background overrides */
    --bg-section-1: var(--bg-color-01); /* Trajetória - mais escuro */
    --bg-section-2: var(--bg-color-02); /* Minhas Competências - mais claro */
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
}

html{
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

body {
  background: var(--bg-color-02);
  color: var(--text-color);
  min-height: 100vh;
  position: relative;
}

#loader {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--loader-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--loader-fade) ease;
}
#loader.fade {
    opacity: 0;
    pointer-events: none;
}
#loader img {
    width: 96px; height: 96px;
    border-radius: 50%;
    box-shadow: 0 0 32px var(--main-color);
    animation: loader-bounce 1.2s infinite alternate;
}
@keyframes loader-bounce {
    0% { transform: scale(1) translateY(0); }
    100% { transform: scale(1.08) translateY(-12px); }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--main-color);
    margin-bottom: 0.5rem;
    line-height: 1.1;
    font-family: 'Poppins', sans-serif;
}
.hero-pre {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-01);
    margin-bottom: 0.2rem;
}
#typed-title {
    font-weight: 800;
    color: var(--main-color);
    border-right: 2px solid var(--main-color);
    padding-right: 0.2em;
    animation: blink-cursor 1s steps(1) infinite;
}
@keyframes blink-cursor {
    0%, 100% { border-color: var(--main-color); }
    50% { border-color: transparent; }
}

header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.1rem;
    background-color: var(--bg-color-01);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    /*border: solid 1px var(--color-02); /* Test */
}

/* Header: sticky, compact, subtle blur */
header{ backdrop-filter: blur(6px); background-color: rgba(31,36,45,0.85); padding:0.8rem 1.2rem }

.logo{
    font-size: 1.7rem;
    color: var(--text-color);
    font-weight: 600;
    cursor: default;
}

.logo{ font-size:1.1rem; font-weight:700 }

.nav-responsive{
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-color-01);
}

.nav a, .nav-responsive a{
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    transition: 0.4s;

    /*border: solid 1px var(--color-02); /* Test */
}

/* Submenu for desktop */
.nav-item{
    position: relative;
    display: inline-block;
}
.nav-item .sub-menu{
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-color-01);
    padding: 0.5rem 0.6rem;
    border-radius: 0.6rem;
    display: none;
    min-width: 12rem;
    box-shadow: 0 0 0.6rem rgba(0,0,0,0.4);
    z-index: 200;
}
.nav-item .sub-menu a{
    display: block;
    padding: 0.4rem 1rem;
    color: var(--text-color);
}
.nav-item:hover .sub-menu{
    display: block;
}

/* Ensure responsive nav only shows the two main links (already adjusted in HTML) */
.nav-responsive{
    display: none;
}

.nav a:hover, .nav-responsive a:hover{
    color: var(--main-color);
}

section{
    min-height: 100vh;
    padding: 6rem 6rem 2rem;

    /*border: solid 1px var(--color-02); /* Test */
}

span{
    color: var(--main-color);
}

.home, .about{
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

.home-img{
    border-right: solid 0.6rem;
    border-bottom: solid 0.6rem;
    border-image: linear-gradient(135deg, transparent 50%, var(--main-color)) 1;
}

.about-img{
    border-left: solid 0.6rem;
    border-bottom: solid 0.6rem;
    border-image: linear-gradient(225deg, transparent 50%, var(--main-color)) 1;
}

.home-img img, .about-img img{
    width: 100%;
}

.about{
    background-color: var(--bg-color-02);
}

.home-content, .about-content{
    width: 45%;
}

.home-content h1, .about-content h1{
    font-weight: 700;
    line-height: 1.3;

    /*font-size: 2.7rem; /* Test */
}

.home-content h3, .about-content h3{
    font-weight: 700;
    font-size: 1.6rem;
}

.home-content p, .about-content p{
    margin-top: 1.2rem;
    text-align: justify;
}

/* Hero adjustments */
.home-content{ width:100%; text-align:left }
.hero-pitch{ 
  margin:0.6rem 0 1rem; 
  line-height:1.45; 
  color:rgba(255,255,255,0.95);
  text-align: justify;
  hyphens: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.hero-ctas{ display:flex; gap:0.6rem; align-items:center; margin-bottom:0.8rem }
.btn-secondary{ background:transparent; border:1px solid rgba(255,255,255,0.12); color:var(--text-color) }

.projects h2,
.publications h2,
.contact h2{
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.projects {
  background: var(--bg-color-02);
  padding: 3rem 2rem;
}
.projects h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}
.projects-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: stretch; /* Garante que todos os cards tenham a mesma altura */
}
.project-card {
  background: var(--bg-color-01);
  border-radius: 1.2rem;
  box-shadow: 0 2px 16px rgba(43,192,255,0.08);
  padding: 1.2rem 1rem 1.5rem;
  text-align: center;
  width: calc(33.33% - 1.5rem);
  max-width: 340px;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 450px;
  justify-content: space-between;
}
.project-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 6px 32px rgba(43,192,255,0.18);
}
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
  border-radius: 0.8rem;
  margin-bottom: 0.8rem;
  box-shadow: 0 2px 12px rgba(43,192,255,0.10);
  max-height: 180px;
  min-height: 180px;
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.7rem;
  min-height: 40px;
}
.tag {
  background: linear-gradient(90deg, var(--main-color), #7C5CFF);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 0.6rem;
  padding: 0.25rem 0.8rem;
  box-shadow: 0 1px 6px rgba(43,192,255,0.10);
  letter-spacing: 0.03em;
  transition: background 0.2s;
}
.tag:hover {
  background: linear-gradient(90deg, #7C5CFF, var(--main-color));
}
.project-desc {
  color: var(--color-01);
  font-size: 1rem;
  margin-bottom: 1.1rem;
  height: 80px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.project-card > * {
  width: 100%;
}

.project-card > .btn {
  width: auto;
  margin-top: auto;
}

/* Modal de detalhes do projeto */
.modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(31,36,45,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: modal-fade-in 0.4s;
}
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal.open {
  display: flex;
}
.modal-content {
  background: var(--bg-color-02);
  border-radius: 1.2rem;
  padding: 2rem 1.5rem 1.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(43,192,255,0.22);
  position: relative;
  text-align: center;
  animation: modal-content-in 0.35s;
}
@keyframes modal-content-in {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-content img {
  width: 100%;
  max-width: 340px;
  border-radius: 0.8rem;
  margin-bottom: 1rem;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1.2rem;
  font-size: 2.2rem;
  color: var(--main-color);
  cursor: pointer;
  font-weight: 700;
  background: none;
  border: none;
  z-index: 2;
  transition: color 0.2s;
}
.modal-close:hover {
  color: #7C5CFF;
}

@media (max-width: 600px) {
  .modal-content {
    max-width: 98vw;
    padding: 1.2rem 0.5rem 1rem;
  }
  .projects-container {
    grid-template-columns: 1fr;
  }
}

.projects-container{
    /* As regras principais de carrossel estão agora no carousel.css */
    gap: 1.5rem;
}

.projects-container .projects-box{
    padding: 2rem 1rem 2.5rem;
    border-radius: 1.2rem;
    text-align: center;
    border: solid 0.15rem var(--bg-color-01);
    background-color: var(--bg-color-02);
    transition: 0.5s ease;
    /* Removido width fixo para permitir que o carrossel funcione corretamente */
    max-width: 450px;
    display: flex; /* Adicionado para habilitar flexbox */
    flex-direction: column; /* Organiza o conteúdo em coluna */
}

.projects-box{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1; /* Faz com que o card cresça para preencher o espaço */
    min-height: 25rem;
    /* Removido margin-bottom que pode afetar o layout do carrossel */
}

.projects-box p {
    flex-grow: 1; /* Permite que o parágrafo cresça e empurre o botão para baixo */
}

.projects-box i {
    font-size: 4.3rem;
    color: var(--main-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.projects-box:hover i {
    transform: scale(1.1);
}

.projects-container .projects-box:hover{
    border-color: var(--main-color);
    transform: scale(1.01);
}

/* Hover effect requested: scale and smooth transition */
.publications-box{
    transition: all 0.3s ease;
}
.publications-box:hover{
    transform: scale(1.05);
    box-shadow: 0 0 1rem rgba(0,0,0,0.35);
}
.projects-box{
    transition: all 0.3s ease;
}
.projects-box:hover{
    border-color: var(--main-color);
    box-shadow: 0 0 1rem rgba(0,0,0,0.35);
}

.projects-box h3{
    font-size: 1.5rem;
}

.projects-box p, .publications-box p {
    margin: 0.5rem;
    letter-spacing: 0.1rem;
    /* N lines ...*/
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1; /* Faz o parágrafo ocupar o espaço disponível */
}

.publications{
    background-color: var(--bg-color-02);
}

.publications-container{
    display:grid;
    gap: 1rem;
    place-items: center;
}

/* Estilos para ocultar/mostrar publicações extras */
.hidden-publication {
    display: none;
}

.hidden-publication.show {
    display: flex;
    animation: fadeIn 0.5s ease-in-out;
}

  /* Garante que só as extras fiquem ocultas/visíveis */
  .publications-box.hidden-publication {
    display: none !important;
  }
  .publications-box.hidden-publication.show {
    display: flex !important;
    animation: fadeIn 0.5s ease-in-out;
  }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.publications-more {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.publications-more button {
    padding: 0.8rem 2rem;
    background-color: var(--bg-color-02);
    color: var(--main-color);
    border: 2px solid var(--main-color);
    border-radius: 2rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.publications-more button:hover {
    background-color: var(--main-color);
    color: var(--bg-color-01);
    box-shadow: 0 0 0.3rem var(--main-color);
}

.publications-box{
    position: relative;
    border-radius: 0.6rem;
    box-shadow: 0 0 0.6rem var(--bg-color-01);
    overflow: hidden; 
    display: flex; 
}

/* New sections: experience, skills, certifications */
.experience, .skills, .certifications{
    padding: 3rem 6rem;
}

@media (max-width: 767px) {
    .experience, .skills, .certifications{
        padding: 3rem 1rem;
    }
}

.experience h2, .skills h2, .certifications h2{
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.6rem;
    width: 100%;
    padding: 0 1rem;
    white-space: normal;
    word-wrap: break-word;
}

.experience-container{
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}
.exp-card{
    background: var(--bg-color-02);
    border: 0.12rem solid var(--bg-color-01);
    padding: 1rem 1.2rem;
    border-radius: 0.8rem;
    width: 20rem;
    text-align: left;
}
.exp-card h3{
    margin-bottom: 0.4rem;
}
.exp-card .role{
    color: var(--color-01);
    font-weight: 600;
}
.exp-card .period, .exp-card .location{
    font-size: 0.95rem;
    color: var(--color-01);
}

.skills-container{
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.skill-card{
    background: var(--bg-color-02);
    border: 0.12rem solid var(--bg-color-01);
    padding: 1rem 1rem;
    border-radius: 0.8rem;
    min-width: 12rem;
    max-width: 90%;
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: flex-start;
    margin: 0 auto;
}
.skill-card i{
    font-size: 1.6rem;
    color: var(--main-color);
}
.skill-card span{
    font-weight: 600;
}

/* Skills intro */
.skills-intro{ max-width: 900px; margin: 0.6rem auto 1.2rem; color: rgba(255,255,255,0.9); line-height:1.5; text-align: center }

/* Redução de espaçamento em dispositivos móveis */
@media (max-width: 480px) {
  .skills-container {
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

.cert-list{
    max-width: 60rem;
    margin: 0 auto;
    list-style: none;
    display: grid;
    gap: 0.6rem;
    padding: 0 1rem;
}
.cert-list li{
    background: var(--bg-color-02);
    padding: 0.8rem 1rem;
    border-radius: 0.6rem;
    border: 0.12rem solid var(--bg-color-01);
}

.publications-box img{
    width: 100%;
    transition: 0.5s ease;
}

.publications-box img:hover {
    transform: scale(1.1);
}

.publications-box .publications-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, var(--bg-color-02));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(30rem);
    transition: 0.5s ease;
}

.publications-box:hover .publications-layer{
    transform: translateY(0);
    background: linear-gradient(transparent 20%, rgba(31, 36, 45, 0.95) 70%);
}

.publications-layer h4{
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
}

/* Divisor estilizado para os títulos das publicações */
.publications-layer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--main-color);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 238, 255, 0.5);
    transition: width 0.3s ease;
}

.publications-box:hover .publications-layer h4::after {
    width: 80px;
}

.publications-layer p{
    margin: 0.2rem 0 0.5rem;
}

.publications-layer a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    background: var(--text-color);
    border-radius: 50%;
}

.publications-layer a i{
    font-size: 1.2rem;
    color: var(--bg-color-02);
}

form{
    max-width: 45rem;
    margin: 0.6rem auto;
    text-align: center;
    margin-bottom: 2rem;
}

form .input-box{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

form .input-box input,
form textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--bg-color-02);
    border-radius: 0.5rem;
    margin: 0.4rem 0;
}

form textarea{
    resize: none;
}

footer{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 1.2rem;
    background-color: var(--bg-color-01);
}

.social-media img{
    width: 3.5rem;
}

.social-media a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: solid 0.15rem var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 1.8rem 0.5rem;
    transition: 0.5s ease;
}

.social-media a:hover{
    background-color: var(--main-color);
    color: var(--bg-color-02);
    box-shadow: 0 0 0.3rem var(--main-color);
}

/* === button === */

.btn{
    display: inline-block;
    padding: 0.7rem 1.8rem;
    background-color: var(--main-color);
    border-radius: 2rem;
    color: var(--bg-color-02);
    font-weight: 600;
    letter-spacing: 0.1rem;
    transition: 0.3s ease;
    margin-top: 1.2rem;
}

.btn:hover{
    box-shadow: 0 0 0.3rem var(--main-color);
    background-color: inherit;
    color: var(--main-color);
    cursor: pointer;
}

/* Focus and micro-interaction helpers */
.btn:focus, .btn-secondary:focus, .timeline-prev:focus, .timeline-next:focus{ outline: 3px solid rgba(43,108,176,0.25); outline-offset: 3px }

/* === /button === */

/* === menu hamburguer === */
.menu-hamburguer{
    display: none;
    cursor: pointer;
}

.bar1, .bar2, .bar3{
    width: 2rem;
    height: 0.3rem;
    background-color: var(--text-color);
    margin: 0.4rem 0;
    transition: 0.3s ease;
}

.change .bar1{
    transform: translate(0, 0.65rem) rotate(-45deg);
}

.change .bar2{
    opacity: 0;
}

.change .bar3{
    transform: translate(0, -0.65rem) rotate(45deg);
}
/* === /menu hamburguer === */

/* WhatsApp floating button */
#whatsapp-float{
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: var(--main-color);
    color: var(--bg-color-02);
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    box-shadow: 0 0 0.6rem rgba(0,0,0,0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#whatsapp-float i{ font-size: 2.2rem; }
#whatsapp-float:hover{ transform: translateY(-4px); box-shadow: 0 0 1rem rgba(0,0,0,0.45); }

/* === media queries === */
/* Extra small (xs): Smatphone (portratit) */
@media (min-width: 0px) {
    .menu-hamburguer{
        display: block;
    }

    .nav{
        display: none;
    }

    .nav-responsive a{
        display: block;
        font-size: 1.2rem;
        margin: 0.5rem 0;
    }

    section{
        padding: 6rem 1.5rem;
    }
    
    /* Ajuste específico para seções com título sob a faixa de notícias */
    .projects, .publications {
        padding-top: 5rem; /* Ajustado para refletir o espaçamento correto */
        margin-top: 2.3rem; /* Altura da faixa de notícias */
    }

    .home, .about{
        flex-direction: column;
        gap: 1.2rem;
    }

    .home-img, .about-img{
        width: 80%;
        max-width: 80%;
    }

    .home-content, .about-content{
        width: 100%;
    }

    .home-content div{
        text-align: center;
    }

    .home-content h1, .about-content h1{
        font-size: 2.2rem;
        font-weight: 700;
        line-height: 1.3;
    }

    .projects-container{
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .projects-box{
        width: 100% !important;
        max-width: 450px;
    }
    /* Responsive rules for new sections */
    .experience-container{
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .exp-card{
        width: 100%;
        max-width: 36rem;
    }
    .skills-container{
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0 10px;
    }
    .skill-card{
        width: 100%;
        max-width: 28rem;
        justify-content: flex-start;
        margin-bottom: 8px;
    }
    .cert-list{
        grid-template-columns: 1fr;
    }
    .skills h2, .projects h2 {
        margin-bottom: 1.5rem;
        padding: 0 5px;
        font-size: 1.7rem;
    }
}

/* Small (sm): Smartphone (landscape) */
@media (min-width: 576px) {
    .home-img, .about-img{
        width: 65%;
        max-width: 65%;
    }

    .projects-box{
        width: 70%;
    }
}

/* Medium (md): Tablet */
@media (min-width: 768px) {
    .menu-hamburguer{
        display: none;
    }
    
    .nav{
        display: block;
    }

    .nav-responsive, .nav-responsive a{
        display: none;
    }

    .home, .about{
        flex-direction: row;
        justify-content: space-evenly;
    }

    .home-img, .about-img{
        max-width: 35%;
    }

    .home-content, .about-content{
        width: 50%;
    }

    .publications-box{
        width: 80%;
        margin-bottom: 2rem;
    }

    .publications-container{
        grid-template-columns: auto auto;
    }

    form .input-box input{
        width: 49%;
    }
}

/* Large (lg): Notebook */
@media (min-width: 992px) {
    .home-img, .about-img{
      max-width: 35%;
    }

    .projects-container{
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: center;
      gap: 1.5rem;
    }
    .project-card {
      height: 450px;
      display: flex;
      flex-direction: column;
    }
  
    .project-card img {
      height: 180px;
      min-height: 180px;
      object-fit: cover;
    }
}

/* Extra Large (xl): Desktop */
@media (min-width: 1200px) {
    
    .home-img, .about-img{
        max-width: 25%;
    }

    .home-content h1{
        font-size: 2.7rem;
    }
    .home-content h3{
        font-size: 2.7rem;
    }
    .publications-box{
        width: 90%;
        margin-bottom: 2rem;
    }
    .publications-container{
        grid-template-columns: auto auto;
    }
}

/* Center the Trajetória section content */
.experience{ display:flex; flex-direction:column; align-items:center; padding:3rem 2rem; }
.experience h2{ text-align:center; width:100%; max-width:1100px; margin:0 auto 1.6rem }

/* Constrain timeline to central column */
.timeline{ width:100%; max-width:1100px; margin:0 auto; position:relative }

@media (min-width:768px){
    .experience{ padding:3rem 6rem }
}

/* Timeline styles - mobile-first */
.timeline-controls{ display:flex; gap:0.6rem; justify-content:center; margin-bottom:0.8rem }
.timeline-controls button{ background:var(--timeline-accent); color:#fff; padding:0.4rem 0.8rem; border-radius:0.4rem; cursor:pointer }

.timeline{ list-style:none; display:flex; flex-direction:column; gap:1rem; padding:0 0.5rem }
.timeline-item{ display:block }
.timeline-card{ background:var(--bg-color-02); padding:1rem; border-radius:0.6rem; border:1px solid rgba(255,255,255,0.03); position:relative }
.timeline-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}
.timeline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--main-color) 60%, var(--bg-color-02) 100%);
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    box-shadow: 0 2px 12px rgba(43,192,255,0.12);
    transition: transform 0.3s;
}
.timeline-item.active .timeline-card {
    border: 2px solid var(--main-color);
    box-shadow: 0 0 0.8rem rgba(43,192,255,0.18);
    background: linear-gradient(135deg, var(--bg-color-02) 80%, rgba(43,192,255,0.08) 100%);
    transform: scale(1.03);
    z-index: 2;
}
.timeline-item.active .timeline-icon {
    background: linear-gradient(135deg, var(--main-color) 80%, #7C5CFF 100%);
    color: #fff;
    transform: scale(1.12);
    box-shadow: 0 4px 18px rgba(43,192,255,0.22);
}

/* Vertical line on mobile - left side */
.timeline::after{ content:''; position:absolute; left:1.2rem; top:0; bottom:0; width:3px; background:var(--timeline-line-color); transform:translateX(-50%); }

/* Desktop: horizontal scrollable timeline */
@media (min-width: 900px){
    .timeline{ flex-direction:row; align-items:flex-start; overflow-x:auto; padding:1rem; scroll-snap-type:x mandatory; gap:2rem }
    .timeline-item{ min-width:20rem; flex:0 0 auto; scroll-snap-align:center }
    .timeline-card{ padding:1rem 1.2rem; }
    .timeline-item::before{ left: calc(50% - 1.2rem); top: -1.6rem }
    .timeline::after{ content:''; position:absolute; left:0.8rem; right:0.8rem; top:3.6rem; height:6px; background:linear-gradient(90deg,var(--timeline-accent), rgba(255,255,255,0.2)); border-radius:6px; z-index:1 }
    .timeline-card{ position:relative; z-index:2 }
    /* ensure timeline controls sit above the line */
    .timeline-controls{ margin-bottom:1rem }
}

/* Disabled state for timeline buttons */
.timeline-controls button:disabled,
.timeline-controls button.disabled{
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Ensure Trajetória and Competências have distinct backgrounds */
.experience{ background-color: var(--bg-section-1); }
.skills{ background-color: var(--bg-section-2); }

/* Add a subtle top divider to separate sections visually */
.experience, .skills{ border-top: 1px solid rgba(255,255,255,0.03) }

.contact {
  background: var(--bg-color-02);
  padding: 3rem 2rem;
  text-align: center;
}
.contact h2 {
  font-size: 2rem;
  margin-bottom: 1.2rem;
}
#contact-form {
  max-width: 480px;
  margin: 0 auto 2rem;
  background: var(--bg-color-01);
  border-radius: 1rem;
  box-shadow: 0 2px 16px rgba(43,192,255,0.08);
  padding: 2rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.input-box {
  display: flex;
  gap: 1rem;
}
.input-box input {
  flex: 1;
  padding: 0.8rem;
  border-radius: 0.6rem;
  background: var(--bg-color-02);
  color: var(--text-color);
  font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
}
#contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  border-radius: 0.6rem;
  background: var(--bg-color-02);
  color: var(--text-color);
  font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  resize: none;
}
.contact-social {
  margin-top: 1.2rem;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
}
.contact-social a {
  font-size: 2rem;
  color: var(--main-color);
  background: var(--bg-color-01);
  border-radius: 50%;
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(43,192,255,0.10);
  transition: background 0.2s, color 0.2s;
}
.contact-social a:hover {
  background: var(--main-color);
  color: var(--bg-color-02);
}
body.light-mode .projects,
body.light-mode .experience,
body.light-mode .home,
body.light-mode .contact,
body.light-mode .certifications,
body.light-mode .publications,
body.light-mode footer {
  background: var(--bg-color-02) !important;
}
.theme-toggle {
  background: none;
  border: none;
  color: var(--main-color);
  font-size: 2rem;
  margin-left: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}
.theme-toggle:hover {
  color: #7C5CFF;
}

/* Light mode */
body.light-mode {
  --bg-color-01: #f6f8fa;
  --bg-color-02: #e9eef3;
  --text-color: #232946;
  --main-color: #2BC0FF;
  --color-01: #555;
  --bg-section-1: #e9eef3;
  --bg-section-2: #fff;
}

/* Ajuste do divisor para o modo claro */
body.light-mode .publications-box:hover .publications-layer {
  background: linear-gradient(transparent 20%, rgba(255, 255, 255, 0.95) 70%);
}

body.light-mode .publications-layer h4::after {
  background: var(--main-color);
}
body.light-mode {
  background: linear-gradient(135deg, #e9eef3 0%, #f6f8fa 100%);
  color: var(--text-color);
}
.skills {
  background: var(--bg-section-2);
  padding: 4rem 1rem;
}
.experience {
  background: var(--bg-section-1);
}
body.light-mode .logo,
body.light-mode .btn,
body.light-mode .btn-secondary,
body.light-mode .tag,
body.light-mode .timeline-icon,
body.light-mode .theme-toggle,
body.light-mode .skill-card span,
body.light-mode .home-content h1,
body.light-mode .home-content h3,
body.light-mode .about-content h1,
body.light-mode .about-content h3 {
  color: var(--text-color);
}
body.light-mode .project-card,
body.light-mode #contact-form,
body.light-mode .skills-container .skill-card {
  background: #fff;
  color: var(--text-color);
}
body.light-mode .contact-social a {
  background: #fff;
  color: var(--main-color);
}
body.light-mode .contact-social a:hover {
  background: var(--main-color);
  color: #fff;
}
body.light-mode .modal-content {
  background: #fff;
  color: var(--text-color);
}
body.light-mode .timeline-item.active .timeline-card {
  background: linear-gradient(135deg, #fff 80%, #e9eef3 100%);
}
body.light-mode .timeline-item.active .timeline-icon {
  background: linear-gradient(135deg, var(--main-color) 80%, #7C5CFF 100%);
}
body.light-mode .hero-pitch {
  color: var(--text-color);
}
body.light-mode .skills {
  background: var(--bg-color-02);
}
body.light-mode header {
  background-color: var(--bg-color-01);
  backdrop-filter: blur(6px);
}

/* News Ticker */
.news-ticker {
  background-color: var(--main-color);
  color: var(--bg-color-01);
  width: 100%;
  overflow: hidden;
  position: fixed;
  top: 3.65rem; /* Ajuste para equilibrar as margens superior e inferior */
  left: 0;
  z-index: 99;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Ajuste responsivo para a faixa de notícias em telas menores */
@media (max-width: 480px) {
  .news-ticker {
    top: 3.5rem;
    height: auto;
  }
  
  .ticker-wrapper {
    height: auto;
    min-height: 2.3rem;
    padding: 0.3rem 0.5rem;
  }
  
  .ticker-title {
    font-size: 0.9rem;
    margin-right: 0.7rem;
    padding-right: 0.7rem;
  }
  
  .ticker-item {
    padding: 0 1rem;
  }
  
  /* Ajuste do divisor para telas pequenas */
  .ticker-item:not(:last-child)::after {
    height: 10px;
    width: 1px;
  }
  
  /* Ajuste específico para a seção de projetos em telas muito pequenas */
  .projects, .publications {
    padding-top: 3.5rem;
    margin-top: 2.3rem;
  }
  
  .projects h2, .publications h2 {
    padding-top: 1rem;
  }
}

.ticker-wrapper {
  display: flex;
  align-items: center;
  height: 2.3rem;
  padding: 0.15rem 1rem; /* Ajuste de padding vertical para melhor alinhamento */
  position: relative;
  overflow: hidden; /* Garante que o conteúdo não vaze */
}

/* Fade masks to create the "passing under" effect */
.ticker-wrapper::before,
.ticker-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.ticker-wrapper::before {
  left: 0;
  width: 12rem; /* Aumento da largura do gradiente para cobrir o título */
  background: linear-gradient(90deg, var(--main-color) 50%, rgba(0,238,255,0) 100%);
}

.ticker-wrapper::after {
  right: 0;
  width: 8rem;
  background: linear-gradient(90deg, rgba(0,238,255,0) 0%, var(--main-color) 80%);
}

.ticker-title {
  font-weight: 700;
  margin-right: 1rem;
  white-space: nowrap;
  padding-right: 1.5rem;
  border-right: 2px solid rgba(0,0,0,0.15);
  position: relative;
  z-index: 3; /* Ensure the title is always visible */
  background-color: var(--main-color); /* Garante que o título tem o fundo sólido */
}

.ticker-content {
  display: flex;
  animation: ticker 25s linear infinite;
  white-space: nowrap;
  padding-left: 100%;
  z-index: 1;
}

.ticker-item {
  padding: 0 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
}

/* Divisor entre os itens do ticker */
.ticker-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 12px;
  width: 2px;
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 1px;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.2);
}

.ticker-item a {
  color: var(--bg-color-01);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.ticker-item a:hover {
  text-decoration: underline;
  color: #fff;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

body.light-mode .news-ticker {
  color: #111; /* Texto preto em vez de branco para o modo claro */
}

body.light-mode .ticker-item a {
  color: #111; /* Links pretos em vez de brancos para o modo claro */
}

body.light-mode .ticker-item a:hover {
  color: #333; /* Cor mais escura ao passar o mouse no modo claro */
}

/* Ajuste do divisor para o modo claro */
body.light-mode .ticker-item:not(:last-child)::after {
  background-color: rgba(0, 0, 0, 0.25); /* Divisor um pouco mais escuro no modo claro para melhor visibilidade */
}

body.light-mode .ticker-wrapper::before {
  background: linear-gradient(90deg, var(--main-color) 50%, rgba(0,238,255,0) 100%);
}

body.light-mode .ticker-wrapper::after {
  background: linear-gradient(90deg, rgba(0,238,255,0) 0%, var(--main-color) 80%);
}

/* Adjusted section padding to account for the ticker */
section {
  padding-top: 7.6rem; /* Ajustado para refletir as novas margens da faixa */
}

/* Ajuste para que projetos e publicações tenham como referência a faixa de notícias */
.projects, .publications {
  padding-top: 4rem; /* Removido o espaço extra para que a margem seja baseada na faixa */
  margin-top: 2.3rem; /* Altura da faixa de notícias */
}

@media (max-width: 992px) and (min-width: 769px) {
  .project-card {
    width: calc(50% - 1rem);
  }
}

/* Especificamente para a seção de projetos em telas pequenas */
@media (max-width: 768px) {
  .projects, .publications {
    padding-top: 5rem; /* Ajustado para dar mais espaço em telas menores */
    margin-top: 2.3rem; /* Mantém a altura da faixa */
  }
  
  .project-card {
    width: 100%;
    max-width: 340px;
    height: auto;
    min-height: 450px;
  }
  
  .projects-container {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-pitch {
    font-size: 1rem;
    line-height: 1.5;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 600px) {
  .input-box {
    flex-direction: column;
    gap: 0.5rem;
  }
  #contact-form {
    padding: 1.2rem 0.5rem 1rem;
  }
}

.experience {
  background: none !important;
}

.experience {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.projects, .publications {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 4rem;
  /* padding-top removido para usar margin-top baseado na faixa */
}

/* Ajuste de altura para dispositivos móveis */
@media (max-width: 768px) {
    section {
      min-height: auto;
    }
    .experience, .projects, .publications {
      min-height: auto;
      padding-top: 3rem;
      padding-bottom: 3rem;
    }
}

/* Ajustes específicos para telas muito pequenas */
@media (max-width: 480px) {
  .news-ticker {
    top: 3.5rem; /* Pequeno ajuste na posição da faixa para telas pequenas */
  }
  
  .projects h2, .publications h2 {
    margin-top: 1rem; /* Ajustado para garantir espaço adequado em telas pequenas */
  }
  
  .hero-pitch {
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
    padding: 0 0.5rem;
    word-spacing: normal;
    letter-spacing: normal;
  }
  
  section h2 {
    font-size: 1.8rem !important;
    text-align: center !important;
    width: 100% !important;
    padding: 0 0.5rem !important;
    white-space: normal !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 1.5rem !important;
  }
  
  section h2 span {
    display: inline-block;
  }
  
  .skills {
    padding-top: 2rem;
    padding-bottom: 0.5rem;
  }
  
  .projects {
    padding-top: 0.5rem;
  }
  
  .project-card {
    min-height: 420px;
    height: auto;
    padding: 1rem 0.8rem 1.2rem;
  }
  
  .project-desc {
    font-size: 0.95rem;
    text-align: center;
    padding: 0 0.2rem;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    height: auto;
    min-height: 80px;
  }
  
  .project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
  }
  
  .tag {
    font-size: 0.85rem;
    padding: 0.2rem 0.6rem;
  }
  
  .skills h2 {
    font-size: 1.6rem !important;
    line-height: 1.3;
    margin-bottom: 2rem;
  }
  
  .skill-card {
    width: 85%;
    padding: 0.8rem 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
  }
  
  .skill-card i {
    font-size: 1.4rem;
  }
}