/* ======================= GENERAL STYLES & VARIABLES ======================= */
:root {
    --header-height: 70px;
    --bg-color: #0f1020;
    --primary-color: #1b1c34;
    --secondary-color: #2c2d4b;
    --accent-color: #00aaff;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --font-primary: 'Inter', 'Poppins', Arial, sans-serif;
    --font-secondary: 'JetBrains Mono', 'Roboto Mono', monospace;
}


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

html {
    scroll-behavior: smooth;
}

main {
    /* ensure anchored sections are not hidden behind the fixed header */
    scroll-padding-top: var(--header-height);
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 16px;
    background: var(--accent-color);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    z-index: 2000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 12px;
}

/* Visible focus outlines for accessibility */
a:focus,
.btn:focus,
.btn-secondary:focus {
    outline: 3px solid rgba(0, 170, 255, 0.25);
    outline-offset: 2px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

h1,
h2,
h3 {
    color: var(--heading-color);
    font-weight: 600;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

.content-section {
    padding: 6rem 0;
}

.section-subtitle {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
}


/* ======================= HEADER / NAVIGATION ======================= */
.header {
    background-color: rgba(15, 16, 32, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--secondary-color);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    height: 70px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    font-family: var(--font-secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-weight: 400;
    font-size: 1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.nav-link.active {
    color: var(--accent-color);
    font-weight: 600;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--heading-color);
}


/* ======================= HERO SECTION ======================= */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 0 2rem;
    background: linear-gradient(rgba(15, 16, 32, 0.8), rgba(15, 16, 32, 1)), url('https://www.transparenttextures.com/patterns/cubes.png');
}

.hero-content .subtitle {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin: 0.5rem 0 1.5rem;
}

.hero-content .description {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background: #0088cc;
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.4);
}


/* ======================= ABOUT ME SECTION ======================= */
#about {
    background-color: var(--primary-color);
}

.about-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-skills h3 {
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-color);
    padding-left: 0.8rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-item {
    background-color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-item:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.3);
}


/* ======================= EXPERIENCE SECTION ======================= */
#experience {
    background-color: var(--bg-color);
    /* Darker background for contrast */
}

.experience-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Vertical line */
.experience-timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--secondary-color);
    top: 2rem;
    bottom: 2rem;
    /* Should end at the bottom of the last item's marker roughly, but last item has margin-bottom 0.
                     The container has padding-bottom 2rem.
                     If we want line to stop at the last marker, we need to know the height.
                     The timeline should probably extend to the last item.
                     Let's set bottom: 2rem to match the top padding symmetry/container padding. */
    left: 20px;
    /* Adjust based on logo size */
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    /* Space for logo/marker */
    margin-bottom: 2.5rem;
    /* z-index removed to avoid stacking issues */
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
    padding: 2px;
    /* White padding if needed */
}

.timeline-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background-color: white;
    /* Ensure logo is visible on dark bg */
}

.timeline-content {
    background-color: var(--primary-color);
    /* Card look */
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
}

.timeline-content h3 {
    margin-bottom: 0.2rem;
    color: var(--heading-color);
}

.timeline-company {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.timeline-period {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Grouped roles support */
.timeline-company-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.role-item {
    position: relative;
    padding-left: 1rem;
    border-left: 2px solid var(--secondary-color);
    margin-bottom: 1.5rem;
}

.role-item:last-child {
    margin-bottom: 0;
}

.role-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-color);
}

.role-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--text-color);
    /* Slightly softer than main heading */
}

/* ======================= EDUCATION SECTION ======================= */
#education {
    background-color: var(--primary-color);
}

.education-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.education-card {
    background-color: var(--secondary-color);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.education-card:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.1);
}

.education-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    background-color: white;
    /* Optional: in case logos have transparency that needs white bg */
    padding: 2px;
    border-radius: 4px;
}

.education-details {
    flex-grow: 1;
}

.education-card h3 {
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.education-institution {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.education-year {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* ======================= PROJECTS SECTION ======================= */
#projects h2,
#contact h2 {
    text-align: center;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--primary-color);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-card img {
    width: 100%;
    height: 200px;
    /* Or adjust as needed */
    object-fit: cover;
}

.project-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.project-card-content p {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background-color: rgba(0, 170, 255, 0.1);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-family: var(--font-secondary);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    background-color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    color: var(--text-color);
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: #fff;
}


/* ======================= CONTACT SECTION ======================= */
#contact {
    background-color: var(--primary-color);
    text-align: center;
}

.contact-info .btn {
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Contact buttons with icons (Font Awesome) - icon-only circular buttons */
.contact-btn {
    /* keep a generous clickable area but show no visible circle */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    /* clickable area */
    height: 48px;
    padding: 0;
    border-radius: 50%;
    text-decoration: none;
    background: transparent;
    /* no visible circle */
    color: var(--text-color);
    transition: transform .08s ease, color .12s ease;
    border: none;
}

.contact-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 170, 255, 0.12);
}

.contact-icon {
    font-size: 1.9rem;
    /* larger icon */
    color: inherit;
    width: auto;
    height: auto;
    line-height: 1;
    transition: transform .12s ease, color .12s ease;
}

.contact-btn:hover .contact-icon,
.contact-btn:focus .contact-icon {
    color: var(--accent-color);
    transform: scale(1.25);
}

/* hero-specific social icons (placed under profile photo) */
.hero-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0 1.5rem 0;
}

/* visually hide the text but keep it for screen readers */
.contact-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}


/* ======================= FOOTER ======================= */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--secondary-color);
    font-size: 0.9rem;
}


/* ======================= RESPONSIVE DESIGN ======================= */
@media(max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
    }

    .nav-item {
        margin: 16px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    /* evita que o nome do logo quebre em várias linhas no mobile */
    .nav-logo {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60%;
        /* ajuste conforme necessário */
        font-size: 1.1rem;
        /* reduz um pouco a fonte no mobile */
    }
}

/* telas muito pequenas: reduz ainda mais o texto do logo */
@media (max-width: 420px) {
    .nav-logo {
        font-size: 1rem;
        max-width: 55%;
    }
}


.profile-photo {
    display: block;
    margin: 0 auto 20px auto;
    width: 200px;
    /* Reduce width */
    height: 200px;
    /* Reduce height */
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ======================= SCROLL ANIMATIONS ======================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}


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

/* ======================= ARTICLES SECTION ======================= */
.articles-section {
    padding: 8rem 0 4rem;
    /* More extensive top padding to account for fixed header */
    min-height: 80vh;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background-color: var(--primary-color);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 170, 255, 0.15);
    border-color: var(--accent-color);
}

.article-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.article-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-date {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.article-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--heading-color);
}

.article-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    opacity: 0.9;
    flex-grow: 1;
}

.read-more {
    font-weight: 600;
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.2s ease;
}

.read-more:hover {
    gap: 0.8rem;
}

/* Individual Article Page */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 2rem;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-meta {
    font-family: var(--font-secondary);
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #d1d1d1;
    /* Slightly lighter for readability */
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--heading-color);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content pre {
    background-color: #0d0e1b;
    /* Darker bg for code */
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--secondary-color);
}

.article-content code {
    font-family: var(--font-secondary);
    font-size: 0.9em;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    font-family: var(--font-secondary);
    font-size: 0.9rem;
}

/* Article Visual Enhancements */
.question-box {
    background-color: rgba(0, 170, 255, 0.05);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.question-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.question-list li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
}

.question-list li::before {
    content: "?";
    position: absolute;
    left: 0;
    font-weight: bold;
    color: var(--accent-color);
    background: rgba(0, 170, 255, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.concept-img {
    width: 100%;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid var(--secondary-color);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.1);
}

.benefit-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.benefit-list li {
    background: rgba(45, 55, 72, 0.3);
    padding: 1rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.benefit-icon {
    color: var(--accent-color);
}
/* ======================= PRICING SECTION ======================= */
.pricing-section {
    background-color: var(--bg-color);
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.pricing-card {
    background-color: var(--primary-color);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    width: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 170, 255, 0.15);
    border-color: var(--accent-color);
}

.pricing-card.highlight {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.1);
}

.pricing-badge {
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.3rem 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pricing-title {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin: 1.5rem 0 0.5rem;
}

.pricing-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.pricing-period {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.pricing-features li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.pricing-features li i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.pricing-card .btn {
    width: 100%;
}
