/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
    /* Premium Dark Theme Colors */
    --bg-base: #0a0a0c;
    --bg-surface: #141417;
    --bg-subtle: #1c1c21;

    --text-primary: #f0f0f2;
    --text-secondary: #9a9a9f;
    --text-muted: #6b6b72;

    --accent-primary: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --accent-gradient: linear-gradient(135deg, #60a5fa, #3b82f6);
    --accent-gradient-text: linear-gradient(90deg, #c4b5fd, #3b82f6, #2dd4bf);

    --border-color: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-sans: 'Inter', -apple-system, sans-serif;

    /* Effects */
    --glass-bg: rgba(10, 10, 12, 0.65);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background-color: var(--accent-primary);
    color: #fff;
}

/* ==========================================================================
   Background Image
   ========================================================================== */
.bg-image {
    position: fixed;
    top: 0;
    left: calc(50% - 800px);
    /* Align slightly left of the hero container */
    width: 600px;
    height: 100vh;
    /* Make sure it bleeds to the top & bottom */
    background-image: url('background.png');
    background-repeat: no-repeat;
    background-size: cover;
    /* Change to cover to stretch vertically across the block */
    background-position: center top;
    opacity: 0.12;
    /* Alta transparência */
    filter: grayscale(100%);
    /* Sem saturação */
    z-index: -2;
    pointer-events: none;

    /* Stronger faded/smoked edges to blend cuts heavily on left and right specifically */
    mask-image: radial-gradient(ellipse 60% 80% at center, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 80%);
    -webkit-mask-image: radial-gradient(ellipse 60% 80% at center, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 80%);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

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

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--accent-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Layout & Components
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 2rem 0;
    /* Reduced from 6rem 0 */
    min-height: auto;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-base);
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-primary);
}

.btn-secondary {
    background-color: var(--bg-subtle);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background-color: var(--bg-surface);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link.active::after {
    width: 100%;
}

/* Nav Projects Dropdown */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    margin-top: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    width: max-content;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 0.5rem;
    z-index: 200;
}

/* Bridge gap to prevent hover loss */
.nav-menu::before {
    content: '';
    position: absolute;
    top: -1.5rem;
    left: 0;
    right: 0;
    height: 1.5rem;
}

.nav-dropdown:hover .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-dropdown-item svg {
    transition: transform 0.3s ease;
}

.nav-dropdown-item:hover svg {
    color: var(--accent-primary);
    transform: translateX(3px);
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-color);
}

.lang-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.current-lang-wrapper {
    display: flex;
    align-items: center;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    padding: 0.5rem 0;
    z-index: 200;
}

.lang-dropdown:hover .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    width: 100%;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.lang-option.active {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

.flag-img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(10, 10, 12, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-family: var(--font-sans);
}

.badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Balance sides equally */
    gap: 4rem;
    align-items: start;
    /* Align to top so texts flow naturally */
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-list {
    list-style: none;
}

.skill-list li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.skill-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* ==========================================================================
   Experience Section (Matches Education Card)
   ========================================================================== */
.experience-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Unified Card Block for both Experience and Education */
.card-block {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-block:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.experience-meta {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.experience-meta h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.experience-meta .company {
    display: block;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.experience-meta .date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.experience-desc {
    list-style: none;
}

.experience-desc li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.experience-desc li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

/* ==========================================================================
   Education Section
   ========================================================================== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.education-card h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.education-card .institution {
    display: block;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.education-card .date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.project-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    display: grid;
    grid-template-columns: 1fr;
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.project-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-subtle);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s ease;
}

.project-card:hover .project-img {
    transform: scale(1.05);
    /* Slight zoom on hover for premium feel */
}

.img-overlay {
    position: absolute;
    inset: 0;
    /* Soft dark gradient mask over the image so it blends better and is readable */
    background: linear-gradient(180deg, rgba(10, 10, 12, 0) 0%, rgba(10, 10, 12, 0.6) 100%);
    pointer-events: none;
}

.project-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.project-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.project-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.project-desc {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

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

.project-tags span {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    width: max-content;
}

.project-link svg {
    transition: transform 0.3s ease;
}

.project-link:hover {
    color: var(--accent-primary);
}

.project-link:hover svg {
    transform: translateX(4px);
}

@media (min-width: 768px) {
    .project-card {
        grid-template-columns: 1fr 1fr;
    }

    .project-image {
        aspect-ratio: auto;
        height: 100%;
    }
}

/* ==========================================================================
   Contact Section & Footer
   ========================================================================== */
.contact-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient-text);
}

.contact-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-box p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
    border: 1px solid #25D366;
}

.btn-whatsapp:hover {
    background-color: transparent;
    color: #25D366;
    border-color: #25D366;
}

.btn-linkedin {
    background-color: #0077b5;
    color: #fff;
    border: 1px solid #0077b5;
}

.btn-linkedin:hover {
    background-color: transparent;
    color: #0077b5;
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
    border: none;
}

.btn-instagram:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations & Reveals
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .project-info {
        padding: 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .bg-image {
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        background-size: cover;
        opacity: 0.08;
        mask-image: radial-gradient(ellipse 70% 80% at center, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 80%);
        -webkit-mask-image: radial-gradient(ellipse 70% 80% at center, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 80%);
    }
}