@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&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');

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  background-color: #1d1d1f;
  color: var(--bg);
  font-family: 'Poppins', sans-serif;
}

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

*:focus-visible {
    outline: 2px solid #f5f5f7;
    outline-offset: 2px;
}
img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
}

nav {
    max-width: 1200px;
    margin: auto;
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;

}

.nav-logo {
    max-width: 60px;
    border-radius: 100px;
    transition: all 0.2s ease;
    background-color: #1d1d1f;
}

.user {
    font-size: 1.9rem;
    color: #d5d5d7;
    font-weight: 500;
}

.user span {
    font-size: 2.2rem;
    font-weight: 550;
    color: #f5f5f7;

}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 70px;
}

.links a {
    position: relative;
    padding-bottom: 0.75rem;
    color: #f5f5f7;
}

.links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.links a:hover::after {
    width: 100%;

}

.btn-curriculo {
    font-family: 'Poppins', sans-serif;
    padding: 0.9rem 0.9rem;
    font-size: 1rem;
    border-radius: 100px;
    border: 1px solid #5d5d5d;
    color: #f5f5f7;
    background-color: #1d1d1f;
    cursor: pointer;
    
    transition: background-color 0.3s ease, 
                transform 0.2s ease, 
                color 0.3s ease;
}

.btn-curriculo:hover {
    background-color: #f5f5f7;
    color: #1d1d1f;
    transform: scale(1.08);
}

.btn-mobile-menu {
    display: none;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #f5f5f7;
    cursor: pointer;
}

.btn-mobile-menu:focus {
    outline: 2px solid #f5f5f7;
    outline-offset: 2px;
}   

.btn-mobile-menu:hover {
    transform: scale(1.1);
}

.btn-mobile-menu:active {
    transform: scale(0.95);
}

.btn-mobile-menu i {
    pointer-events: none;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 2rem;
    }
}

:root {
    --bg: #1d1d1f;
    --text: #f5f5f7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1rem;
}

header{
    position: relative;
    padding: 6rem 1rem;
    display: flex;
    gap: 4rem;
}

header .content {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 3.5rem;
}

header .content h1 {
    font-size: 5.5rem;
    margin-bottom: 2rem;
    color: #f5f5f7;
    margin-top: 1rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-align: center;
}

header .content h1 .name {
    font-weight: 600;
}

.Front-End {
    max-width: 700px;
    margin: -0.5rem auto 0;
    font-size: 1.2rem;
    color: #b3b3b7;
    padding: 1rem 1.4rem;
    line-height: 1.6rem;
    border: none;
    text-align: center;
    background-color: #2c2c2e;
    border-radius: 100px;
    margin-bottom: 2.5rem;
}

.descricao {
    margin-top: 1rem;
    font-size: 1.5rem;
    color: #d9d9db;
    line-height: 1.6rem;
    text-align: center;
    margin-bottom: 2rem;
}

.roll-page {
    position: absolute;
    bottom: 3rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #f5f5f7;
    font-size: 2.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.biblioteca {
    width: 100%;
    padding: 3rem 1rem;
    background-color: #1d1d1f;
    margin-top: 3rem;
}

hr {
    border: none;
    border-top: 2px solid #333;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    box-sizing: border-box;
    color: #555; 
}

.title {
    max-width: 1200px;
    margin: 0 auto 2rem;
    color: #f5f5f7;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-size: 45px; 
    margin-left: 12rem;
    margin-top: 5rem;
}

.sub-title {
    display: flex;
    max-width: 1200px;
    margin: 0 auto 2rem;
    color: #b3b3b7;
    font-weight: 400;
    line-height: 1.5;
    font-size: 20px; 
    margin-left: 12rem;
    margin-bottom: 3rem;
}

/* --- Container dos Projetos --- */
.projetos {
    display: grid;
    /* Força 2 colunas no desktop, 1 coluna no mobile */
    grid-template-columns: repeat(2, 1fr); 
    gap: 2.5rem; 
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* --- Estilização do Card --- */
.card {
    background: #1c1c1e;
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #2c2c2e;
    
    /* Configuração inicial para a animação do JS (Revelação) */
    opacity: 0;
    transform: translateY(30px);
       
    transition: 
        transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), 
        opacity 0.8s ease, 
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    
    will-change: transform, opacity;
}

.card.visible {
    opacity: 1;
    transform: translateY(0); /* Volta para a posição normal */
}

.card.visible:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: #3a3a3c;
    cursor: pointer;
}

.card:active {
    transform: translateY(-5px) scale(1.0);
    transition: transform 0.1s ease;
}
/* --- Área da Imagem --- */
.card-image {
    width: 100%;
    height: 320px; /* Aumentamos a altura da imagem */
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Preenche o espaço sem esticar */
}

/* --- Área de Texto (Informações) --- */
.card-info {
    padding: 1.5rem 2rem 2rem 2rem; /* Espaçamento interno apenas aqui */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-info h4 {
    font-size: 1.6rem;
    font-weight: 500;
    color: #f5f5f7;
    margin: 0;
}

.card-info p {
    font-size: 1rem;
    color: #b3b3b7; /* Cinza mais suave para a descrição */
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

/* --- Tags de Tecnologia --- */
.card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-tags span {
    background: #2c2c2e;
    color: #a1a1a6;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 400;
}

/* --- Ajuste para Mobile --- */
@media (max-width: 900px) {
    .projetos {
        grid-template-columns: 1fr; /* Volta para 1 coluna em telas pequenas */
    }
}
/* Animação de aparecer ao rolar */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 750ms cubic-bezier(0.22, 1, 0.36, 1), transform 750ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

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

/* --- Layout Principal da Secção Sobre Mim --- */
.sobre-mim-section {
    background-color: #1d1d1f;
    padding: 5rem 1rem;
}

.sobre-mim-layout {
    display: grid;
    /* Cria duas colunas: a da esquerda ocupa o espaço necessário, a da direita o restante */
    grid-template-columns: 1fr 1fr;
    gap: 4rem; /* Espaço grande entre o texto e os cards */
    align-items: start;
}

/* --- Estilos da Coluna da Esquerda (Texto) --- */
.descricao-sobre {
    font-size: 1.1rem;
    color: #b3b3b7;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 500px;
}

/* --- Estilos das Estatísticas (Rodapé) --- */
.stats-container {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 600;
    color: #f5f5f7;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1rem;
    color: #b3b3b7;
}

/* --- Estilos da Coluna da Direita (Grid de Skills) --- */
.sobre-mim-skills {
    display: grid;
    /* Grid 2x2 para os 4 cartões */
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* --- Estilos Específicos dos "Skill Cards" --- */
/* Note que eles já herdam a classe .card base para animações */
.skill-card {
    padding: 2rem; /* Padding interno maior para estes cards */
    height: auto; /* Altura automática baseada no conteúdo */
    min-height: 220px; /* Altura mínima para consistência */
    justify-content: flex-start; /* Alinha conteúdo ao topo */
}

/* Estilo dos Ícones dentro dos skill cards */
.skill-card i {
    font-size: 2.5rem;
    color: #f5f5f7;
    margin-bottom: 1.5rem;
    display: block;
}

.skill-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #f5f5f7;
}

.skill-card p {
    font-size: 0.95rem;
    color: #86868b;
    line-height: 1.4;
    margin: 0;
}

/* --- Responsividade --- */
@media (max-width: 968px) {
    .sobre-mim-layout {
        /* Em tablets e telemóveis, empilha tudo numa coluna */
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .title {
        margin-left: 0 !important; /* Garante alinhamento em telas menores */
    }

    .stats-container {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    /* Em ecrãs muito pequenos, os skills também ficam em 1 coluna */
    .sobre-mim-skills {
        grid-template-columns: 1fr;
    }
    
    .stat-item h3 {
        font-size: 2.5rem;
    }
}
.contato {
    width: 100%;
    padding: 3rem 1rem;
    background-color: #141414;
    margin-top: 3rem;
    text-align: center;
}

.title-contato {
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-size: 55px;
    color: #f5f5f7;
    margin-bottom: 2rem;
}

.contato p {
    margin-top: 1rem;
    font-size: 1.5rem;
    color: #d9d9db;
    line-height: 1.6rem;
    text-align: center;
    margin-bottom: 2rem;
}

section .contato a {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.9rem 1.5rem;
    font-size: 1.2rem;
    border-radius: 100px;
    border: 1px solid #5d5d5d;
    color: #f5f5f7;
    background-color: #141414;
    cursor: pointer;

    transition: background-color 0.3s ease, 
                transform 0.2s ease, 
                color 0.3s ease;
}

.ri-arrow-right-up-line {
    font-size: 1.2rem;
}

section .contato a:hover {
    background-color: #f5f5f7;
    color: #1d1d1f;
    transform: scale(1.08);
}

.redes-sociais {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-media {
    background-color: #1d1d1f;
    border: none;
    cursor: pointer;
    color: #f5f5f7;
    font-size: 2rem;
    padding: 1rem;
    border-radius: 100px;
    transition: transform 0.2s ease;
}

.social-media:hover {
    transform: scale(1.1);
    background-color: #333;
}