/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Fundo: Azul Escuro Profundo Original */
    --bg-color: #0f172a;
    --hover-bg: #1e293b; 

    /* Frente: Cores da Cafeteria */
    --text-color: #e2e8f0; /* Cinza claro quase branco */
    --text-muted: #a7b3c7; /* Cinza azulado suave */
    --accent-color: #c5a367; /* Latão Patinado (Dourado Elegante) */
    --border-color: #334155; /* Borda sutil azulada */
    --surface-color: #111d35;
    --surface-color-soft: #15213b;
    --header-height: 68px;
    --content-max: 1240px;

    --font-mono: "Fira Code", monospace;
}

/* Cor de seleção do texto (Dourado com fundo Azul) */
::selection {
    background: var(--accent-color);
    color: var(--bg-color);
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 5%, rgba(197, 163, 103, 0.07), transparent 34%),
        radial-gradient(circle at 90% 15%, rgba(148, 163, 184, 0.05), transparent 28%);
    color: var(--text-color);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: calc(var(--header-height) + 22px);
}

/* Container - Padding responsivo idêntico ao do Yudi */
.container {
    width: 100%;
    margin: 0 auto;
    max-width: calc(var(--content-max) + 36px);
    padding: 0 clamp(12px, 2vw, 18px) 36px;
}

.highlight {
    color: var(--accent-color);
    font-weight: bold;
}

.highlight-alt {
    color: #7c93ff;
    font-weight: bold;
}

/* --- CABEÇALHO --- */
header {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    font-size: 0.86rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.header-shell {
    width: min(var(--content-max), calc(100% - 24px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 1px;
    font-size: 0.95rem;
    border: 1px solid rgba(197, 163, 103, 0.3);
    border-radius: 8px;
    padding: 5px 9px;
    transition: all 0.3s;
}

.brand:hover {
    color: var(--bg-color);
    background: var(--accent-color);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 16px);
}

.main-nav a,
.mobile-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.86rem;
    transition: color 0.3s;
}

.main-nav a:hover,
.mobile-nav a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(197, 163, 103, 0.33);
    background: transparent;
    width: 42px;
    height: 38px;
    border-radius: 9px;
    cursor: pointer;
    padding: 7px 8px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    margin: 5px 0;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    width: min(var(--content-max), calc(100% - 32px));
    margin-top: 10px;
    display: none;
    border: 1px solid rgba(197, 163, 103, 0.2);
    border-radius: 10px;
    background: rgba(21, 33, 59, 0.92);
    padding: 10px 12px;
}

.mobile-nav a {
    display: block;
    padding: 9px 2px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.menu-open .mobile-nav {
    display: block;
}

.social-links {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.2vw, 14px);
    flex-wrap: wrap;
}

.social-links a {
    font-size: clamp(0.8rem, 0.77rem + 0.2vw, 0.9rem);
    color: var(--text-muted);
    text-decoration: none;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s;
}

.social-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease-in-out;
}

.social-links a:hover {
    color: var(--accent-color);
}

.social-links a:hover::after {
    width: 100%;
}

/* --- HERO SECTION --- */
#hero {
    min-height: 100svh;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 0;
}

.hero-img-container { 
    margin-bottom: 16px; 
}

.hero-profile-pic {
    width: clamp(96px, 16vw, 132px);
    height: clamp(96px, 16vw, 132px);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(197, 163, 103, 0.55);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
}

.intro { 
    font-size: clamp(1rem, 0.9rem + 0.8vw, 1.25rem); 
    margin-bottom: 0; 
    color: var(--text-color); 
    line-height: 1; 
}

#hero h1 { 
    font-size: clamp(2rem, 5vw, 3.2rem); 
    margin: 0 0 6px 0; 
    font-weight: 400; 
    color: var(--text-color); 
    line-height: 1.08;
    letter-spacing: 0.5px;
}

.cursor { 
    display: inline-block; 
    animation: blink 1s step-end infinite; 
    color: var(--accent-color); 
    font-weight: normal; 
}

@keyframes blink { 
    0%, 100% { opacity: 1; } 
    50% { opacity: 0; } 
}

.subtitle { 
    font-size: clamp(0.92rem, 0.82rem + 0.48vw, 1.02rem); 
    color: var(--text-muted); 
    max-width: 42ch; 
    margin-bottom: 24px; 
}

.btn-email {
    background-color: rgba(17, 29, 53, 0.75);
    color: var(--text-color);
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(197, 163, 103, 0.3);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, background-color 0.3s, border-color 0.3s;
    box-shadow: none;
}

.btn-email:hover { 
    transform: translateY(-2px); 
    background-color: rgba(197, 163, 103, 0.12); 
    border-color: rgba(197, 163, 103, 0.62);
    color: #fff;
}

.btn-whatsapp {
    margin-top: 10px;
    border: 1px solid rgba(37, 211, 102, 0.45);
    color: #d8ffe7;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 211, 102, 0.1);
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.2s, background-color 0.3s, border-color 0.3s;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    background: rgba(37, 211, 102, 0.2);
    border-color: rgba(37, 211, 102, 0.8);
    color: #fff;
}

.scroll-arrow { 
    margin-top: 28px; 
    font-size: 1.55rem; 
    color: var(--text-muted); 
    animation: bounce 2s infinite; 
    pointer-events: none; 
    opacity: 0.6; 
}

#about,
#experience,
#skills,
#contact {
    content-visibility: auto;
    contain-intrinsic-size: 1px 700px;
}

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

/* =======================================================
   ESTRUTURA EXATA DO MODELO DE REFERÊNCIA (YUDI)
   ======================================================= */

/* Títulos das Seções (Sobre mim / Meus Projetos) */
.section-title {
    text-align: left;
    font-weight: bold;
    font-size: clamp(1.55rem, 1.1rem + 1vw, 2rem);
    margin-bottom: 1.2rem;
    color: var(--text-color);
}

/* --- SOBRE MIM --- */
#about {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Calibrado para manter a foto do Sobre fora da primeira dobra da tela. */
    padding: clamp(74px, 10.5vh, 108px) 0;
    margin-bottom: clamp(18px, 3vh, 28px);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: clamp(16px, 2.8vw, 28px);
    width: 100%;
}

.about-copy {
    width: 100%;
}

/* Layout lado a lado em desktop */
@media (min-width: 640px) {
    .about-container {
        grid-template-columns: minmax(0, 66%) minmax(0, 34%);
        align-items: start;
        gap: clamp(16px, 2.4vw, 30px);
    }
}

.about-copy {
    justify-self: start;
}

.about-text {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    max-width: 100%;
    line-height: 1.75;
    font-size: 1rem;
    text-align: left;
    color: var(--text-color);
}

.about-paragraph {
    margin: 0 0 1.2rem 0;
}

.about-paragraph:last-child {
    margin-bottom: 0;
}

@media (min-width: 640px) {
    .about-text {
        margin-right: 3.75rem;
    }
}

.about-img {
    border-radius: 12px;
    display: block;
    width: min(100%, 320px);
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 52% 28%;
    justify-self: center;
    align-self: center;
    border: 1px solid rgba(197, 163, 103, 0.35);
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.38);
}

@media (min-width: 960px) {
    #about {
        margin-inline: clamp(-14px, -2vw, -30px);
    }
}

#about .section-title {
    color: #f8fafc;
}

/* --- MEUS PROJETOS --- */
#experience {
    margin-top: 0;
}

#skills {
    margin-top: 1.6rem;
}

.skills-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.skill-card {
    background: rgba(17, 29, 53, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    padding: 18px;
}

.skill-card h2 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 10px;
}

.skill-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.skill-tags {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tags span {
    border: 1px solid rgba(197, 163, 103, 0.35);
    border-radius: 999px;
    font-size: 0.78rem;
    padding: 4px 10px;
    color: var(--text-color);
    background: rgba(15, 23, 42, 0.7);
}

.cta {
    margin-top: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    padding: clamp(18px, 4vw, 30px);
    background:
        linear-gradient(145deg, rgba(17, 29, 53, 0.75), rgba(15, 23, 42, 0.82)),
        radial-gradient(circle at 100% 0%, rgba(197, 163, 103, 0.08), transparent 40%);
}

.cta h2 {
    font-size: clamp(1.2rem, 0.94rem + 1.2vw, 1.9rem);
    margin-bottom: 10px;
}

.cta p {
    color: var(--text-muted);
    max-width: 68ch;
    font-size: 0.94rem;
}

.cta-actions {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cta-actions .btn-whatsapp {
    margin-top: 0;
}

/* --- FORMULÁRIO DE CONTATO --- */
.contact-form {
    margin-top: 24px;
    padding: 20px;
    background: rgba(17, 29, 53, 0.5);
    border: 1px solid rgba(197, 163, 103, 0.2);
    border-radius: 8px;
    max-width: 500px;
}

.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(197, 163, 103, 0.3);
    border-radius: 6px;
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 3px rgba(197, 163, 103, 0.1);
}

.btn-ghost {
    border: 1px solid rgba(197, 163, 103, 0.5);
    color: var(--text-color);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-ghost:hover {
    background: rgba(197, 163, 103, 0.16);
    color: #fff;
}

.experience-container {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
}

@media (min-width: 860px) {
    .experience-container {
        flex-direction: row;
    }
}

.tab-buttons {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    padding: 0;
    list-style: none;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.tab-buttons li {
    list-style: none;
}

@media (min-width: 860px) {
    .tab-buttons {
        flex-direction: column;
        min-width: 180px;
        border-right: 1px solid rgba(148, 163, 184, 0.2);
        border-bottom: none;
        padding: 0.25rem 0.15rem;
    }
}

.tab-btn {
    font-size: 0.98rem;
    cursor: pointer;
    padding: 0.52rem 0.75rem;
    margin-bottom: 0;
    transition: all 0.3s;
    color: var(--text-muted); /* text-gray-400 */
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 4px;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--accent-color); /* hover:text-yellow-600 */
    background-color: rgba(197, 163, 103, 0.04);
}

.tab-btn.active {
    color: var(--accent-color); /* text-yellow-600 */
    border-color: transparent;
    background-color: rgba(197, 163, 103, 0.09);
}

@media (min-width: 860px) {
    .tab-btn.active {
        border-left: 2px solid var(--accent-color);
    }
}

.tab-content-wrapper {
    flex: 1; /* flex-1 */
    padding: clamp(10px, 2vw, 18px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

.job-title {
    font-size: clamp(1.15rem, 0.95rem + 1.2vw, 1.5rem);
    font-weight: bold;
    color: #fff; /* text-white */
    margin-bottom: 0.25rem; /* mb-1 */
}

.job-date {
    color: var(--text-muted); /* text-gray-400 */
    margin-bottom: 1rem;
    font-size: 0.875rem; /* text-sm */
    font-family: var(--font-mono);
}

.job-details {
    list-style: none;
    padding: 0;
}

.job-details li {
    display: flex;
    align-items: flex-start;
    color: var(--text-muted); /* text-gray-300 */
    font-size: clamp(0.88rem, 0.82rem + 0.3vw, 0.94rem);
    line-height: 1.85;
    margin-bottom: 0.75rem;
}

.job-bullet {
    color: var(--accent-color); /* text-yellow-600 */
    margin-right: 0.75rem; /* mr-3 */
    flex-shrink: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Links no texto */
.text-link {
    color: var(--accent-color);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.text-link:hover {
    color: var(--bg-color);
    background-color: var(--accent-color);
    text-decoration: none;
    padding: 0 4px;
    border-radius: 4px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 20px;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

/* Barra de rolagem Personalizada (Navy & Gold) */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #334155; 
    border-radius: 6px;
    border: 3px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color); 
}

/* Botão Voltar ao Topo */
#btn-top {
    position: fixed;
    bottom: 20px;
    right: 18px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.35rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

#btn-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#btn-top:hover {
    background-color: var(--text-color); 
    color: var(--bg-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(197, 163, 103, 0.5);
}
/* ==========================================
   LIGHTBOX (Esconde a "Imagem Ampliada" e faz o efeito de clique)
   ========================================== */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.98); /* Fundo azul escuro quase sólido */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0; /* Começa invisível */
    pointer-events: none; /* Não bloqueia cliques quando invisível */
    transition: opacity 0.3s ease;
}

#lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

#lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    border: 2px solid var(--accent-color);
}

#lightbox-overlay.active #lightbox-img {
    transform: scale(1);
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: var(--text-color);
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
    transition: color 0.3s;
}

#lightbox-close:hover {
    color: var(--accent-color);
}

/* Deixa o mouse com lupa na foto sobre mim caso queira clicar nela */
.about-img {
    cursor: zoom-in;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (max-width: 640px) {
    .main-nav,
    .social-links {
        display: none;
    }

    .menu-toggle {
        display: inline-block;
    }

    .header-shell {
        width: calc(100% - 32px);
    }

    header {
        padding-bottom: 10px;
    }

    .social-links a {
        padding: 6px 8px;
        border-radius: 6px;
    }

    .intro {
        font-size: 1rem;
    }

    .scroll-arrow {
        margin-top: 28px;
    }

    .job-details li {
        margin-bottom: 0.8rem;
    }

    .cta-actions .btn-email,
    .cta-actions .btn-ghost {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 641px) {
    .mobile-nav {
        display: none !important;
    }

    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}