/* ======================= 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);
}

.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;
}


/* ======================= 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;
}


/* ======================= 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);
}