/* Estilos Globais e Tipografia */
:root {
    --primary-color: #161b22;      /* Cor de fundo para seções principais como header/footer */
    --secondary-color: #58a6ff;     /* Cor de destaque para links */
    --background-color: #0d1117;   /* Cor de fundo principal da página */
    --text-color: #c9d1d9;         /* Cor principal do texto */
    --card-background: #161b22;     /* Cor de fundo para cards e seções */
    --heading-color: #e6edf3;       /* Cor para títulos */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('assets/image/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--heading-color);
    margin-bottom: 1rem;
}

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

/* Header / Hero Section */
.hero {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--heading-color);
    margin: 0;
    font-size: 2.5rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Seção Sobre Mim */
#about {
    padding: 3rem 0;
    text-align: center;
    background-color: var(--card-background);
    border-radius: 8px;
    margin-top: -50px; /* Puxa a seção para cima, sobrepondo levemente o header */
    position: relative; /* Necessário para o z-index funcionar se preciso */
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Seção do Portfólio */
#portfolio {
    padding: 3rem;
    background-color: rgba(22, 27, 34, 0.7); /* Cor do card com 70% de opacidade */
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-top: 3rem;
    backdrop-filter: blur(5px); /* Efeito de desfoque no fundo */
}

/* Estilos do Carrossel */
.carousel {
    position: relative;
    width: 100%;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    background-color: var(--card-background);
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    /* Oculta a barra de rolagem, mas permite rolar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.carousel-container::-webkit-scrollbar {
    border-radius: 8px;
}

.carousel-item {
    flex: 1 0 auto;
    padding: 1rem;
    box-sizing: border-box;
    width: 280px;
}

.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    object-fit: contain;
}

.carousel-item .caption {
    text-align: center;
    margin-top: 0.5rem;
    font-style: normal;
    color: var(--text-color);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(44, 62, 80, 0.7);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.3s;
}

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

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

/* Seção de Tecnologias */
#technologies {
    padding: 3rem;
    text-align: center;
    background-color: rgba(22, 27, 34, 0.9); /* Cor do card com 70% de opacidade */

    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-top: 3rem;
}

.tech-icons {
    display: flex;
    flex-wrap: wrap; /* Permite quebrar linha em telas menores */
    justify-content: center;
    gap: 40px; /* Espaço entre os ícones */
    margin-top: 2rem;
}

.tech-item {
    text-align: center;
    width: 120px; /* Largura fixa para cada item */
}

.tech-item img {
    width: 80px; /* Tamanho do ícone */
    height: 80px;
    object-fit: contain; /* Garante que a imagem caiba sem cortar */
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.tech-item img:hover {
    transform: translateY(-5px); /* Efeito sutil ao passar o mouse */
}

.tech-item p {
    margin: 0;
    font-weight: bold;
    color: var(--text-color);
}


/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

footer a {
    color: var(--secondary-color);
    margin: 0 10px;
}

.profile-image {
    text-align: center;
    margin-bottom: 20px;
}

.profile-image img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
}

/* Animação de Fade-in na Rolagem */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries para Responsividade */
@media (max-width: 768px) {
    /* Ajustes gerais */
    body {
        font-size: 16px; /* Ajusta o tamanho da fonte base */
    }

    .container {
        padding: 0 15px;
    }

    /* Header / Hero */
    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px; /* Evita que o texto toque as bordas */
    }

    .profile-image img {
        width: 120px;
        height: 120px;
    }

    /* Seções */
    #portfolio, #technologies {
        padding: 2rem 0;
    }

    h2 {
        font-size: 1.8rem;
    }

    /* Carrossel */
    .carousel-item {
        width: 90%; /* Cada item ocupa quase toda a tela */
        flex-shrink: 0; /* Impede que os itens encolham */
    }

    .carousel-button {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    /* Tecnologias */
    .tech-item {
        width: 90px;
    }
    .tech-item img {
        width: 60px;
        height: 60px;
    }
}

.github-icon {
    width: 24px;
    height: 24px;
    margin-left: 10px;
    vertical-align: middle;
}